Thanks for posting this question in Q&A.
Ideally publishing one function app that shares a storage account with another function app doesnt wipe out the contents of the other app. If two or more functions are sharing the same storage account and the functions are being published, different fileshares (one for each function app) gets created in the Storage account. Please see below screenshot of my storage account that is shared by multiple function apps
When you publish a functions to the same function app, the contents gets overwritten. Another scenario where you will lose the existing function is that, if you have the same fileshare value specified in the app setting WEBSITE_CONTENTSHARE in both function apps, the contents will be overwritten.
However, as you mentioned, sharing storage accounts between function apps is not recommended. Here is why this isnt recommended : https://github.com/MicrosoftDocs/azure-docs/issues/87366
I hope this helps!
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.