VR can in the Steam flatpak. The issue is that from within the flatpak sandbox, the SteamVR tries to run
sudo setcap CAP_SYS_NICE+eip ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher
but it can’t use sudo. However, running the command from outside the flatpak sandbox allows SteamVR to work.
The solution would be for Valve to update the SteamVR installer to work around the flatpak sandbox or ask the user to run the command manually.