Hi,
Here is a method for your reference:
We can configure the policy as following to filter the user not apply the mapping drive policy when connect through the VPN.
Or if the computers use different ip address when at the VPN, you can also use the following item to filter:
Then ,when you connect to the vpn ,the mapping drive policy will not apply. Mapping drives will not display for the users.