Can you try the attached patch (this is for testing purpose *only*) and report back if that makes any difference?
With this patch, if the compositor has no support for Xwayland keyboard grab protocol as you said you haven't in Ubuntu, Xwayland won't set up its grab handler at all.
Created attachment 133910
Test patch
Can you try the attached patch (this is for testing purpose *only*) and report back if that makes any difference?
With this patch, if the compositor has no support for Xwayland keyboard grab protocol as you said you haven't in Ubuntu, Xwayland won't set up its grab handler at all.