prabhat Kumar, Based on my understanding of your scenario description, you are looking for this- How-to configure a custom error page on App Service
App Service enables the use of custom error pages for 403, 502, and 503 error codes so you can customize your users experience.
I understand that you have implemented this feature, but it's not working for stopped site.
Custom error pages are for errors that terminate on the FrontEnd (ie, request that doesn't make to your app). For this case, a 404-error page is not meaningful, since when a 404 comes from the FrontEnd it means we were unable to find a site for a hostname in the first place. Once the request gets to the app it is assumed the users' can use whatever error page.