Here’s a little explanation about stale elements.
A common solution is to use st.empty to forcibly clear out a page or section.
st.empty