OAuth Token Refresh Handling for Persistent WebSocket Messaging Sessions

We are encountering intermittent 401 Unauthorized errors on the Genesys Cloud Messaging API WebSocket connection within our AppFoundry integration when the underlying OAuth access token expires during an active, long-running conversation. The client SDK attempts to reconnect, but the session state is lost, causing duplicate message delivery or dropped threads. The environment involves multi-org authentication with premium app permissions. What is the correct way to implement seamless token rotation for persistent WebSocket connections without disrupting the active messaging session or requiring a full client re-initialization?