I reported the bug upstream for Xwayland: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1288 It will be fixed.