I have this issue as well. I can consistently replicate the issue. I have tested my mouses on both PC and Mac and it only seems to happen on the Mac version regardless of mouse used. I have attached a video of the bug. I was using 1.19.4 on MacOS Ventura when I first noticed this. I am continuing to have the issue in 1.20 and 1.20.1.
I have tried 3 mouses- 1 Apple Mouse and 2 Logitech Mouses. I don't get the same behavior on my PC. It seems to be related to the Mac version or the mouse settings on the MacOS.
It definitely still happens in 1.21.3. I can get it to happen in both a chest and an inventory screen. I am running the game full screen on MacOS 15.1. i open a container, move mouse and exit the container while the mouse is moving. The first person view will snap to a different position than the original position. I've included a link to a video to demonstrate. video example