@A Aathithya , Based on my understanding of your issue descripition, on App Service when you perform any security testing, the result response is received from the frontends and never arrive to the actual worker (for example, invalid request). Currently, if your requirement fits, you can App Gateway/WAF similar proxy in front and strip out the response header there. If it’s an enterprise app, it’s a good practice to have the WAF either way.
Please check this doc - Common scenarios for header rewrite
We have a UserVoice post on a similar request, ‘remove server header from the front end servers’ - you may wish to up-vote.
Kindly let me know how it goes, or share more details about your requirement.