Reconnect after macOS sleep doesn't work in Chrome

When macOS goes to sleep and it’s activated again the session is resumed in Firefox but restarts in Chrome.
So if some output of a computation was visualized and macOS goes to sleep, after it’s activated again the screen in Firefox still has the visualization and can be used as if the sleep event didn’t happen but on Chrome the application is restarted.

AFAIK Chrome browsers send disconnect before going to sleep and Streamlit does a session cleanup but not for Firefox.

Can this be fixed?