VPN Changes Hostname
The VPN's DHCP server probably assigns hostname together with the IP address and the computer uses it instead of what you've set during setup and what appears in System Preferences -> Sharing -> Computer name. 

To set a permanent hostname do 
sudo scutil --set HostName DesiredHostname in Terminal.app (there are also ComputerName and LocalHostName that can be changed there).
Restart may be required.