It’s a bit hard to tell, as the plain assignment would work, if you store the checkpoint directly afterwards.
However, since you are temporarily storing the state_dict and are continuing the training, the checkpoint will also be updated, as explained by @albanD.
I think this behavior didn’t change, but in which version was your approach working?