Preventing losing connection in modes when using the VPN in TCP connection mode