Thanks for the detailed answers. So we can say that Wayland sacrifices lower latency in exchange for higher accuracy.
According to this post Gnome allows you to change this behavior through an environment variable (MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0
on Ubuntu 22.04). It should be a configurable option, considering the amount of people complaining about this mouse behavior.
Oh and this is also why the cursor movement might visibly start stuttering during heavy GPU load. This is a problem that was solved back in the 80s but here we are…
Sad, but does this problem only affect Wayland or also Xorg?
So do you want to program a GUI yourself, and not using a library, correct ?