I think your approach might work and should be similar to this small code snippet, it I understand it correctly:
# setup
model = nn.Linear(1, 1)
optimizer = torch.optim.SGD(model.parameters(), lr=1.)
sd = copy.deepcopy(model.state_dict())

# first update
out = model(torch.randn(1, 1))
out.mean().backward()
optimizer.step()

# use new gradients on old state_dict
optimizer.zero_grad()
out = model(torch.randn(1, 1))
out.mean().backward()
model.load_state_dict(sd)
optimizer.step()

I’m not familiar with your use case, but note that you are updating the “old” parameters with the gradients calculated using the forward pass (and loss) from the “new” parameters.
Is this your use case indeed?