Yeah, I finally find the reason.
The network B is updated correctly with network A.
The reason why the loss of network B is not decreasing is that the initialization of net B is different from net A. After I initialize them with same parameters, the loss of net B is synchronized with net A.