This was a fun one to discover
I have my main screen (1) and secondary screen (2) set in windows as that hierachy. window 1 is set up normal and window 2 is a screen that is flipped on its head. I have configured it regularly in windows, but somehow minecraft still thinks it is set in the "normal" orientation. When minecraft is launched on window 2 this bug happens
Your video doesn't show the issue. Please provide some reproduction steps to reproduce this issue.