You can simply add in the second loop fake = netG(noise.detach(), prev)
To recompute fake based on the updated weights at each iteration.

What happened in torch 1.4.0 when I did this

The inplace checks for optimizer.step() were broken back then. We fixed them.