@William A Wang , This is expected due to the orphaned service association link. Here are the commands you can try to delete the subnet,
# log into Azure
az login
# Set the name of your resource group
RES_GROUP=TestRG
# Get network profile ID
NETWORK_PROFILE_ID=$(az network profile list --resource-group $RES_GROUP --query [0].id --output tsv)
# Delete the network profile
az network profile delete --id $NETWORK_PROFILE_ID -y
# Get the service association link (SAL) ID
SAL_ID=$(az network vnet subnet show --resource-group $RES_GROUP --vnet-name TestRGVirtualNetwork --name TestRGSubnet1 --query id --output tsv)/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default
# Delete the default SAL ID for the subnet
az resource delete --ids $SAL_ID --api-version (The api version of the resource (omit for the latest stable version))
# Delete the subnet delegation to Azure Container Instances
az network vnet subnet update --resource-group $RES_GROUP --vnet-name TestRGVirtualNetwork --name TestRGSubnet1 --remove delegations 0
# Delete the subnet
az network vnet subnet delete --resource-group $RES_GROUP --vnet-name TestRGVirtualNetwork --name TestRGSubnet1
# Delete virtual network
az network vnet delete --resource-group $RES_GROUP --name TestRGVirtualNetwork
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.