Unlike regular transform actions, frame changes don't tag the data
to be re-evaluated, causing undo to store outdated data without
any tags to be updated.
Workaround this by ensuring operators that change the frame evaluate
the depsgraph with the new frame before storing undo data.
The main concern I have with this patch is changing the order depsgraph evaluation is done in the event loop.
Although it seems to work fine and is limited to operators that change the frame, so it may be OK.
At first I though this could be more local to frame-change operators, however looking into this it adds code in more places than I'd like: P2671.