How to prime-run by processId

I am using nVidia prime gpu offloading to run games on my gaming laptop. For steam games and on lutris there are options to prepend the command to run the game with ‘prime-run’ to run the game with the GPU.
But for things like Minecraft and Roblox (Grapejuice), I never get to see the command since the game starts from a launcher. Is there a way to prime-run a process by default or something. I tried running grapejuice itself using prime-run, but the roblox session is not using the gpu. (Roblox starts from one of those xdg-open things in the browser.)
Basically, how can I prepend prime-run to a process I don’t launch myself?

You probably need to bypass the launcher then, manually launch your game. But that seems weird that the Minecraft launcher doesn’t start the game with the prime-run environment variables…

Be more specific for each game you have issues with.