I was testing VPN connections with several user profiles active and found a DNS leak that's easy to reproduce. It's similar to the old DNS leak that has been fixed for the main profile but doesn't seem to be fixed system wide when multiple profiles are active.
Previously @GrapheneOS stated that the DNS leaking to other servers outside of the VPN DNS had been fixed but this doesn't always seem to be the case.
I set my default DNS servers to Cloudflare and had multiple profiles active and tried a couple VPN apps (PIA app mostly). When I'm in the owner profile and connect to a server I see no DNS leaks. When I let the owner profile stay active and move to a different profile connected to a VPN in a different country and it disconnects and reconnects I will see both the VPN DNS and a Cloudflare Anycast DNS close to the location of the VPN server running in the main profile.
I had Always-on VPN and Block All Connections enabled in all tested profiles.
I tested this by opening a browser and going to ipleak.net, then connecting and disconnecting the VPN several times while it did several rounds of 300 DNS tests.
Main profile:
Connected to server A.
IPleak results when connected: VPN A DNS
iPleak results when disconnected: Failure to connect
IPleak results when reconnecting or connecting: VPN A DNS or Failure to connect.
Result: As expected the VPN doesn't leak.
Secondary Profile:
Connected to VPN server B
IPleak results when connected: VPN B DNS
IPleak results when disconnected: Failure to connect
IPleak results when reconnect or connecting: VPN B DNS and Cloudflare Anycast DNS in the same location of VPN A.
Results: The VPN leaks to Cloudflare Anycast DNS which uses VPN A's location to connect to the closest Anycast server.
This is unfortunate and still compromises the VPN users privacy because it leaks DNS traffic in a secondary profile while the main profile is active and connected to a VPN and the secondary profile is reconnecting.