If you're not running Docker Desktop but Rancher Desktop, check out these minor, but required changes (run in host PowerShell):
docker run -it -v /mnt/wslg:/mnt/wslg `
-e DISPLAY=:0 `
-e WAYLAND_DISPLAY=wayland-0 `
-e XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir `
-e PULSE_SERVER=/mnt/wslg/PulseServer `
guitest:1.0
I'm not sure, if /tmp/.X11-unix:/tmp/.X11-unix
is helpful, but it runs without.
Found the equivalent command in this issue: https://github.com/rancher-sandbox/rancher-desktop/issues/7299#issuecomment-2488273892
Acutally, this is closer to @chrillof answer :)