c # – WebSocketSharp issues when used for a turn-based online game in Unity

I use Websocket-Sharp in Unity for a turn-based game to communicate with a server.

As I said earlier, this library is experiencing a major problem of loss of connection detection when turning on / off a VPN on Windows / Mac or Android / iPhone when connecting Mobile Internet of the user switches between 4G and 3G, or vice versa.

Is there a solution to this problem or another library that you recommend to use for WebSocket in unit?

Thank you.