Fwiw maybe worth noting that this is similar to what XWayland does, but that they currently restrict to cases where the cursor is not visible. The rationale is apparently that the pointer locking protocol wasn't meant for warping and possibly shouldn't be used for that purpose.
I don't agree with it but I think it's worth noting. See ongoing discussion on https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1839#note_27996... and a possible workaround on our side in https://gitlab.winehq.org/wine/wine/-/merge_requests/7368.