Azure web app [Streamlit-Python] not loading

We recently experienced an issue with our Streamlit application hosted on Azure App Service (S3:1)[Linux] behind an Application Gateway, it was working smoothly.
Although the problem is currently resolved after restarting the App Service, we would like to understand the possible root causes and recommendations to prevent it in the future.

Scenario:

Architecture:
Client → HTTPS custom domain → Application Gateway → Azure App Service → Streamlit app

Symptom:
While accessing the app via the HTTPS domain, the Streamlit page did not fully load.
The issue occurred intermittently and was resolved immediately after restarting the App Service.

Observations:
CPU and memory usage (~1.4GB) on the App Service were normal during the incident.
App Service is configured with “Always On”, setting as ON so it does not go idle.
Restarting the App Service immediately resolves the problem.
Application Logs did not show any critical errors during the issue.
No network issue at client’s browser side.
Application gateway logs does not have any issues.
Disabled application gateway and tried to access azure web app directly, but still observed the issue.

Questions:
What could be the likely root cause of this intermittent “stuck” behavior for a Streamlit app behind an Azure Application Gateway using HTTPS?
Is it something like Transient network glitch between Application Gateway and App Service.

We would greatly appreciate guidance or insights on this as this is critical and occurred on client’s environment.

Additional Info:
Streamlit version: 1.30.0
Python version: 3.11.4
Web app publish type: Code (not container)

Thank you in advance!