Hey Peter - thanks for your question
An App service resource (and this includes variants built on App service such as Azure functions) must have a globally unique name - this is because the name you give will be a subdomain of the Microsoft owned DNS http://<app-name>.azurewebsites.net
REF
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb
If you already removed the App there may be a small time to wait until it becomes available again (one of my support colleagues who monitor this forum may be able to add more)
In general it's more flexible to assign and use a custom [DNS] name so you do not have a direct dependency on the default name.