Wayland does not permit client applications to programmatically confine or warp the mouse pointer to a specific window.
This behavior is intentionally disallowed by the Wayland protocol for security and usability reasons.
Although pointer confinement is technically possible, it can only be implemented through optional compositor-supported protocols (e.g., zwp_locked_pointer_v1 / zwp_confined_pointer_v1),
which may not be available or enabled in all environments. Additionally, they are not available through XWayland, which Unity relies on.
Therefore, this issue cannot be fixed at this time.