You have to install the org.freedesktop.Platform.VulkanLayer.gamescope
flatpak package. You'll be given a choice of which version: HGL needs 23.08.
https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/issues/3323
Keep in mind that Flatpak apps are sandboxed and don't have full access to the system, including other installed applications and libraries.