removing wireguard connection cause lose of dns server
This is can be related to all VPN connection managers not just wireguard.
Removing VPN connection with DNS server specified as existing one (same IP) network manager will remove it from main network as well. Happens when connecting from home network to home network, as result main connection has 10.8.0.1 as DNS, VPN has 10.8.0.1 and then VPN removed / down here is no DNS left in resolf.conf.
network-manager 1.32.12-1 network-manager-gnome 1.24.0-1