Zero-lag window dragging?

After recently having given GNOME a try, I was impressed by how responsive window dragging is. The cursor never drifts away and stays exactly on top of the point being dragged from. Interestingly, this wasn’t the case on GNOME with X11, so it’s specifically a trait of the Wayland backend.

I’m curious to learn how this is achieved. I know that even Windows has to resort to trickery to pull this off. I.e. the cursor switches from being hardware to software based whenever the user begins dragging a window, exhibiting obvious flickering in the transition.

Having a basic understanding of how compositing works, it’s clear why there tends to be a disconnect between cursor and window of at least one frame, so I cannot wrap my head around how GNOME defies this expectation.