As of this writing, you cannot simply rename an Azure VM. The creation of an Azure VMis separate from the data and the OS. The Azure VM just references the various items needed for the Azure VM to run. As such, you can delete a Azure VM, keep the disk, create a new Azure VMvm and attach the existing disk for an exact clone of the system.
https://www.mscloudbros.com/2024/04/05/rename-an-azure-vm/