Typically, you want to do all your file manipulations prior to pushing these files up to your Azure App Service. Changing files on the server itself is not a scenario that DevOps normally supports.
You have the option of automating these file changes via the Kudu API and PowerShell, then running the script via the Release process. Here's an article I found:
https://blog.kloud.com.au/2016/08/30/interacting-with-azure-web-apps-virtual-file-system-using-powershell-and-the-kudu-api/
I have a similar scenario in an Angular application that requires me to manipulate the build output. These manipulations include running a script which changes environment variables in JSON files, but this script is run during the release process prior to deploying the files to the Azure App Service. This could be an option for you.
Another option could be using a Docker image. I ran into a scenario a year ago where I had developed a solution that required Chromium. It worked great on my machine, but when I went to deploy, I had no way of installing Chromium on the App Service. App services are understandably restricted when it comes to environmental dependencies.
My workaround was to use a Docker image. You can do pretty much anything you want in a Docker image. Once you have your image, your app service can then run your Docker image. Here's a doc to get you started:
https://docs.microsoft.com/en-us/learn/modules/deploy-run-container-app-service/
Hope this helps,
@IkeMtz