@nprofile1q... I dunno about Ubuntu, but I've seen Linux Mint's systemd-resolved ignore local DNS servers gotten via DHCP for seemingly no reason and trying to use cloudflare DoH or something instead. Causing it to randomly fail DNS lookups for local services. And I wouldn't have figured it out if it wasn't for firewall logs.
In the end I never figured out the reason it did so, I couldn't find any config file on system mentioning DoH endpoints (at least not that were enabled) and I couldn't find any other references online to this problem even existing.
maybe it was fbi glowies trying to monitor my shit taste in anime torrents or something, dunno