I've little idea how to describe this issue, so would welcome edit suggestions.
Sometimes the mouse clicking location and the mouse pointer location are offset or misaligned in my installation of GNOME with Ubuntu 22.04 and X11. I see the effect in Firefox and in Nautilus, and currently the only solution I have is to reboot. I would welcome some understanding of the cause of the issue and perhaps a way to address it.
Here is a video illustrating some of what I'm seeing:
https://imgchest.com/p/dl7pqnnw8yo
In the video you can see a Firefox window open. I right-click on the web page to open a context menu, and then the misalignment of the mouse visible pointer and the mouse actual clicking location seems to start. As the visible pointer moves about on the right of the window, the actual clicking location seems to reset to the top-left corner of the window and is seen through the hover reactions of the different Firefox buttons at the top-left.
This is exactly similar issue I was reporting. Caused by driver for graphic tablet or touchpad. Try to remove driver with
sudo apt remove xserver-xorg-input-libinput
For Ubuntu 22.04, a switch from libinput to Synaptics can be accomplished with commands like the following: