The IP address and DNS settings should not be configured through the OS for Azure VMs but instead on the network interface resource. You can reset the IP address as follows: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/reset-network-interface
You can reset the DNS settings on the NIC as per here: https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface#change-dns-servers
If all else fails then you may need to user PowerShell to reset the settings or use the serial console.