Valve has truly headless runner (gamescope) for Linux, e.g. you can start it manually from command-line over ssh
gamescope \
--backend headless \
-W 1920 -H 1080 \
-w 3840 -h 2160 \
-r 60 \
--cursor-scale-height 1080 \
--force-grab-cursor \
-- steam -gamepadui -pipewire-dmabuf
You still need the initial setup for pairing.But it has many issues compared to Games on Whales, for example, which is much more efficient and scales cursor better.