Just FYI, I have a bunch of Debian machines, both VM's and hardware, behind an OpenWRT 24.01 router, all using the router's DNS. It works fine. Whatever's wrong isn't an inherent thing in Debian or OpenWRT. I don't currently have wireguard enabled though, so that's one difference.
Did you...