Welcome to Microsoft Q&A! Thanks for the question.
The standard/native Azure Web Apps run in a secure environment called a sandbox. Each app runs inside its own sandbox, isolating its execution from other instances on the same machine as well as providing an additional degree of security and privacy which would otherwise not be available. So, in your case leverage the custom container version of App Service.
Additional information on this, Azure App Service provides pre-defined application stacks on Windows like ASP.NET or Node.js, running on IIS. The preconfigured Windows environment locks down the operating system from administrative access, software installations, changes to the global assembly cache, also it does not allow the registration of COM components on the platform. and so on (see Operating system functionality on Azure App Service). If your application requires more access than the preconfigured environment allows, you can deploy a custom Windows container instead.
If an app makes use of any COM components, these will need to be rewritten in managed code and deployed with the site or application. App Service using Windows Containers enables usage of the GAC, COM components, MSIs, full access to .NET FX APIs, DirectX, and more.
Kindly checkout these documents for more details on this topic:
Run a custom Linux container in Azure App Service