The online manual (man setxkbmap) says:
"Changing the keymap with setxkbmap is not supported by Xwayland. In
most instances, using setxkbmap on Xwayland is indicative of a bug in a
shell script and setxkbmap will print a warning. Use the Wayland
Compositor's native XKB configuration methods instead."