Guest API WebSocket keeps dropping after 10s idle

I’m building a custom chat UI using the Genesys Guest API WebSocket instead of the widget. The connection works fine initially, but it drops with a 1006 code after 10 seconds of inactivity. I’m sending a simple ping every 5s via socket.send(JSON.stringify({ type: 'ping' })) but it doesn’t help. Here is the handshake payload I’m using. Any ideas why the server kills the connection?