Character moving with open UI

While UI like the settings or vendor screens are open, the game doesn’t properly lock the mouse interaction to the UI, so that interacting with menus causes the character to move, which is highly annoying and can lead to pulling enemies when you are not prepared to combat them.
(I have a less common 32:9 aspect ratio, so maybe that plays a role there?)