This doesn't happen by default. When you create a virtual machine (VM) in the Azure portal, a public IP resource for the virtual machine is automatically created. You use this IP address to remotely access the VM. Although the portal does not create a fully qualified domain name, or FQDN, you can create one once the VM is created. This article demonstrates the steps to create a DNS name or FQDN.
Something here may help.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/portal-create-fqdn
--please don't forget to Accept as answer if the reply is helpful--
--------------------------
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.