Quick answer: Construct 3 Photon multiplayer dropping the connection when the player switches tabs? Browser throttles background tabs - send keepalives on visibilitychange or use Web Locks.

Mobile players lose connection if they alt-tab for 30 seconds. Photon timeout fires while the tab is throttled.

Send heartbeat on visibility

Listen to document.visibilitychange. On visible, send an immediate Photon ping; resync if the timeout already fired.

Lower the timeout

Photon server timeout can be configured per app. Drop to 10s; reconnect logic on the client handles brief drops gracefully.

Auto-reconnect

On disconnect event, attempt reconnect with exponential backoff. Most short interruptions don't need to abort the game session.

“Browsers throttle background tabs by design. Network code has to know.”

Test your reconnect path more than your connect path. Players reconnect often; first connection is once per session.