When two services should not run at the same time, you can use the Conflicts parameter.
To stop a VPN running when using the Transmission service.
Edit the transmission-daemon.service.
sudo vi /lib/systemd/system/transmission-daemon.service
…add the following line in the [Unit] section:
Conflicts=vpn.service
NOTE: vpn.service could be a service that starts a VPN connection.
Reload systemd for the changes to take effect.
sudo systemctl daemon-reload