If the order of events is:
- connect to mattermost instance
- establish vpn connection
- new route to mattermost server goes thru VPN
then most probable cause is that websocket connection gets broken (because "new" VPN client IP is used so TCP connection is terminated)