When exiting out of a menu, the mouse pointer is occasionally visible on the screen in game (where there is not supposed to be a visible pointer) when on Ubuntu.
HOW TO REPRODUCE:
Open your inventory or another in-game GUI where the mouse is visible
Move your mouse quickly
As you do so, press escape
The mouse pointer will now be on the screen wherever it was before you exited even though it is not supposed to.
Version: Minecraft Java Edition 1.19.2
Please check if this is still an issue for you in 1.19.4 or later.