Localhost application is slow when connected to office VPN

I have a local development environment with Oracle-DB running on Docker and a Java-based application running on localhost. The application connects to the DB running on Docker. I observe the application running on localhost takes too long to load the pages. Further, I use Cisco AnyConnect to connect to the office network via VPN. One interesting observation is that the application is loading very slowly when I’m not on VPN or connected to the office network via VPN. However, the application loads in a lightning speed when connected to the client’s VPN. I expect the same speed when I’m not on VPN or connected to the office network via VPN. I’m new to Docker and wondering if this something that need to be done on docker side. I’m using macOS Big Sur and Docker Desktop 4.1.0.

Appreciate any input on the above issue. Thanks.