Hi Chunyu,
If you run your web app in windows container, you may be able to modify the container so that the application pool runs under LocalSystem. For example, you would download one of the windows server container images, run it on your machine, use powershell to change app pool identity to run as LocalSystem, commit changes, upload image to Azure Container Registry, then use this image for your Web App.
Configure a custom container for Azure App Service
Below article documents processModel.identityType, which is what would need to be modified to 0 for LocalSystem:
Something like : Set-ItemProperty IIS:\AppPools\DefaultAppPool -Name processModel.identityType -Value 0
I've not tested the above customizations, so you would need to give it a try.
When not running in container, App Service Web apps run in a sandbox and has very restricted access to their environment. You definitely would not be able to run under Local System when running in sandbox.
Please click Accept Answer if the above was helpful.
Thanks.
-TP