Restoring a VM in Azure with renaming the computer name (inside OS) isn't possible as far as I know.
But for testing the restore process it's possible to use a different Vnet which is should not be peered with the "productive" Vnet.
This way the restored VM will not hijack the DNS record.
Maybe this helps: https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-restore-vms#create-a-vm
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten