WiFi connects but no internet, after shutdown with VPN

Even with sudo? That's surprising...

They (mullvad) must've scripted something to reach out onto the network when uninstalling, probably for reporting reasons. If this causes the whole removal of the package to fail it's something that should be reported to them to fix.

You can modify the DNS resolver to point to something else of your choice, just keep in mind that this is a temporary measure. Edit the file /etc/resolv.conf (you will need administrator permissions) and add a new line with the following:

nameserver 9.9.9.9

This uses Quad9's public DNS servers. Try to access a website to check it's working and then try to uninstall again. If it doesn't work then I would recommend reaching out directly to Mullvad to provide support on the issue.