Discord shows that I am always in the Retroarch Menu

Sometimes the Discord integration gets stuck on “Retroarch Menu”. It won’t change if play a game in Retroarch, or if Retroarch is closed, or if I play a different game. Restarting discord might make it start working correctly again. I don’t know if the problem is caused by Retroarch or Discord, but it doesn’t seem to happen with any other game or RPC integration.