Sometimes when closing a menu, if the mouse is not centered, the camera will snap in the opposite direction of the mouse position relative to the center.
This is extremely disorienting and is definitely an unintended bug. It doesn’t happen all the time, but it happens frequently enough that it causes problems. It has been happening for years at this point.
My suspicion is that sometimes the game forgets that it was just in a menu, and when snapping the mouse back to center, it unintentionally moves the camera when it shouldn’t.
A simple fix would be to, when snapping the mouse position to the center, zero the delta of the mouse movement that controls the camera.
Environment
Mac (version doesn't matter, but currently Tahoe)
This is a duplicate of MC-246988.