Thanks for the info.
It seems model.modules() and newmodel.modules() do not contain the same Modules, i.e.
m1 might be nn.ReLU instead of one of the appropriate classes.
Could you check if by looping the modules and printing them?
for m0, m1 in zip(model.modules(), newmodel.modules()):
    print(m0)
    print(m1)