I am using Mobaxterm terminal emulator on a Windows machine, to connect to various HPC clusters. I also have a corporate VPN using AnyConnect. When the VPN is connected, I can access my company's machines, but SSH connections to external machines time out. If I disconnect the VPN, I can connect to the external machine. Using the -vv flag on the ssh command, I can see that when the VPN is disconnected, the SSH connection completes immediately. With the VPN connected, the URL resolves to the same IP address and port (22), but the connection times out.
as far as I recall, and I could be off here, the older versions of AnyConnect had an option to enable split tunneling (which allows you to maintain unencrypted access to the Internet, and that is most likely the cause of your issue), but on the newer ones, this can only be set in the group policy on the server (e.g. ASA side), for security reasons.
Not sure if that is an option, but the native Windows 10 VPN client lets you configure split tunneling. How to set this up is described in the link below: