This is a known issue with some apps and games on Android. Connecting 3.5mm headphones causes the controller to reconnect to your device. Some apps and games get confused when a controller disconnects and reconnects in the middle of a game.
For maximum compatibility with affected games, connect or disconnect your wired headphones from the controller before starting the game.
Bluetooth headphones are not affected by this issue.