System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65
Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2022-01-27 09:30, hash: rB0379ddac7d68
Worked: I think this bug has been around since the "Undo" implementation was changed.
Short description of error
When you change the current frame in the timeline, then you do any change in the viewport like moving an object, and after that you undo, the previous frame gets display in the viewport, instead of the current one.
Exact steps for others to reproduce the error
-Create any object (could be the default cube)
-Make two keyframes of that object, on frame 1 and 2. Make a very noticeable change in position in each keyframe.
-Switch to frame 1 (if it's not the current frame) and then to frame 2.
-Still in frame 2, move that object and then Undo (ctrl + z). You'll see that frame 1 gets displayed, although the current frame is still 2. If you then change the current frame it gets updated well.
I send a video showing that.