When a Microsoft Foundtry is deleted with the delete subcommand, it is actually soft-deleted, meaning they can be restored.
az cognitiveservices account delete \
--name "foundry-resource-aks-deploy" \
--resource-group "rg-aks-deploy"
After the resource is deleted above, list-deleted subcommand shows the accounts that are soft-deleted.
az cognitiveservices account list-deleted \
--query "[].{Name:name, ResourceGroup:resourceGroup, Location:location}" \
--output table
Name Location
--------------------------- ------------
foundry-resource-aks-deploy centralindia