Preserving values from st.form after unlocking phone

I have an st.form with st.button and inside I have st.number_input widget. I lock the phone, unlock the phone, so session is dead, but I can still adjust values of st.number_input. When I submit the form with st.submit_button, page restarts, removes my adjusted values from st.number_input (resetting to default values) and submits.

Is there a way to preserve values which I put on the form when session was dead?