Is there the concept of an 'administratively prohibited' error in the DNS? So your resolver could return an error with that code rather than an incorrect result.
Dnsmasq can return nxdomain responses
echo 'server=/.example.tld/' >> /etc/dnsmasq.conf
Check dnsgate [2] or FreeContributor [3]
[1] https://www.dnsknowledge.com/whatis/nxdomain-non-existent-do...