I faced the same issue and maybe for somebody my answer will be helpful.
You can try to use your current default DNS Server to query the DNS records.
It's fixed the issue for me.
Open cmd.exe and run commands below:
ipconfig /all | findstr /R "DNS\ Servers"
C:\>ipconfig /all | findstr /R "DNS\ Servers"
DNS Servers . . . . . . . . . . . : 223.121.180.100
DNS Servers . . . . . . . . . . . : 223.121.180.101
Take first DNS Server IP address and set it as a nameserver for the resolver, as an additional nameservers you can set one from Google and one from Cloudflare.
my_resolver = dns.resolver.Resolver(configure=False)
my_resolver.nameservers = ['223.121.180.100', '8.8.8.8', '1.1.1.1']
answer = my_resolver.query('google.com', 'A')