I don’t know if this is the case for you too, but I’ve had an issue like this before. Usually it was caused by me being in a rush and clicking around before the UI has even loaded.
Give the game a second or so upon loading a game and such to catch up. That always corrected it for me
although it might be a contributing factor, clicking around during the loading of the ui does not seem to cause the issue itself. and sometimes the issue occurs even without touching the controls
In the game “Game Dev Tycoon”, a common bug was that you could hold down the middle mouse button and “scroll away” from the UI as it was also web based.