I am also having this issue:
0AD 27
Ubuntu 24.04
snap and/or official ppa version
I am having the impression that, when started with the Gnome application search (hitting the windows key, typing 0ad, starting the app), the game sees a screen slightly smaller when it starts, which would explain why the mouse is shifted. Sometimes I am able to fix the issue by starting it several times, but also sometimes not.