I want my xmpp server to be available both with and without wireguard

Should I add a new DNS record for the internal IP address so it fails if I'm not connected to VPN?

Should I use a DNS server while connected to the VPN that overrides the public DNS record with the intern ip?

Maybe xmpp supports priority records like MX and I can prefer the internal IP address that way

Last thing is possible with srv records but will penalize non wireguard connection establishment I think

https://prosody.im/doc/dns

DNS configuration in Jabber/XMPP – Prosody IM