In Window 10, the Windows Defender Firewall, the relevant item for standard DNS over UDP is "Core Networking - DNS (UPD-out)" You can enable/disable specific IP addresses in this rule.
Some DNS requests go out through TCP. What is the relevant rule?