Disable CNAME check for all azure subscription
Disable
az feature register --namespace Microsoft.Network --name BypassCnameCheckForCustomDomainDeletion
Enable
az feature unregister --namespace Microsoft.Network --name BypassCnameCheckForCustomDomainDeletion
Check the status
az feature list -o table --query "[?contains(name, 'Microsoft.Network/BypassCnameCheckForCustomDomainDeletion')].{Name:name,State:properties.state}"