Yes, calling backward() on the the combined loss computes gradient for both of the networks.
However, in your case, there is no relationship between the networks, then you can call the backward separately without any problem.