WireGuard Client config hotplug

Hello,

First time posting here, new to the OpenWRT community and fairly new to the using OpenWRT firmware.

I've got a simple WireGuard Client config in place (using a commercial VPN provider) i.e. wireguard interface attached to the wan firewall zone.

I've got dns leak from my IPS as I've set my WAN to DNS as advertised by peer.

I do not want to set a static DNS (that all tutorials suggest), as it requires me to switch to my ISP DNS every time I need to turn off the VPN. Before moving to WireGuard, I had had OpenVPN setup with the following scripts:

cat << "EOF" > /etc/hotplug.d/net/00-openvpn-resolv
if [ "${INTERFACE%%[0-9]*}" = "tun" ]
then case "${ACTION}" in
(add) RESOLV_CONF="/tmp/resolv.conf.d/resolv.conf.vpn" ;;
(remove) RESOLV_CONF="/tmp/resolv.conf.d/resolv.conf.auto" ;;
esac
uci set dhcp.@dnsmasq[0].resolvfile="${RESOLV_CONF}"
/etc/init.d/dnsmasq restart
fi
EOF
cat << "EOF" > /etc/hotplug.d/openvpn/00-resolv
env | sed -n -e "
/^foreign_option_.*=dhcp-option.*DNS/s//nameserver/p
/^foreign_option_.*=dhcp-option.*DOMAIN/s//search/p
" | sort -u > /tmp/resolv.conf.d/resolv.conf.vpn
EOF
cat << "EOF" >> /etc/sysupgrade.conf
/etc/hotplug.d/net/00-openvpn-resolv
/etc/hotplug.d/openvpn/00-resolv
EOF
/etc/init.d/openvpn restart

Which allowed me to switch between VPN and ISP DNS seamlessly. I've found the scripts on the official docs

I am wondering if there is something similar I can do for my WireGuard setup? I've tried this same script for wireguard but it doesn't make any different whatsoever.

Thanks in advance!