Thanks. That helps a ton already, provided you won't switch sandbox mechanisms anytime soon. For now, I'll hard-code my games not to try things that won't work in the sandbox.
If you implement Discord RPC in itch, you should probably add a parameter to the manifest that configures if a game handles its own rich presence.
I wanted to implement Discord RPC for matchmaking mostly, so you can click "join game", but that's something I need to bake into my own game logic. Instead of queueing and waiting in the game client, you can idle in Discord and invite people on your friend list. Queueing times for a small indie games might be hours otherwise.
The galaxy brain solution would be to run Discord in the same sandbox... As I understand it, itch sandboxing on Windows uses a separate user account that is basically shared between all itch games. Sandboxing Discord might be a good idea anyway, but then automatic game detection won't work, because Discord needs to look at other processes.