Thanks for reaching us.
Please reboot the VM. When you do changes to DNS, VM need an reboot.
I believe you have done changes on the VM OS level , Always try to do the change of DNS from portal or powershell on the NIC of the VM not on the OS level so it is easy for you to revert the changes.
Hope this was helpful. Please let us know in case of any additional questions or concerns.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well