@Sushant Ashok Bagul Thanks for reaching out. If you are unable to use the same names for your web app and Azure Function in your new Azure account, even after deleting the resources from your old account, it is possible that the names are still reserved in the Azure global namespace. As mentioned here https://video2.skills-academy.com/en-us/troubleshoot/azure/app-service/create-delete-resources-faq#is-there-a-way-to-list-the-deleted-web-apps-for-my-subscription- Deleted apps are purged from the system 30 days after the initial deletion. so only after 30 days you will be able to use the same name. If you need to purge immediately you would need to raise the support ticket so that it can be hard deleted from the back end.
you can use the below rest api call to check the availability of names https://video2.skills-academy.com/en-us/rest/api/appservice/check-name-availability/check-name-availability?view=rest-appservice-2023-12-01&tryIt=true&source=docs#checknameresourcetypes if not available then you need to use different name
please do let me know incase of further queries, I would be happy to assist you.