I believe in mullvad there's a setting to "allow local traffic",
Navigate: to the Preferences or Settings menu. Find: the option for "Local network sharing" and enable it by turning the switch on
or if you are using CLI
mullvad lan set allow
in short, most vpn clients have an option to not override local traffic. while still directing everything outside of your LAN through the VPN.