Run a bot on VPN

I am trying to run a bot on my VPN environment but am observing that when i lost my VPN connection then bot is not working properly so is that necessary to be connected with VPN while running a bot?