Hi @Xia Wang
Thanks for the question and using MS Q&A platform.
You can use Azure PowerShell or Azure CLI commands to attempt deletion, which might bypass some UI restrictions.
Azure CLI:
az resource delete \ --resource-group ExampleResourceGroup \ --name ExampleVM \ --resource-type "Microsoft.Compute/virtualMachines"
Azure Powershell:
Remove-AzResource ` -ResourceGroupName ExampleResourceGroup ` -ResourceName ExampleVM ` -ResourceType Microsoft.Compute/virtualMachines
Reference: Delete resource
Hope this helps. Do let us know if you have any queries.