Streamlit Button Open Popup window of new link

I would like to open a popup window of another streamlit app.

import streamlit as st
from streamlit.components.v1 import html

def open_page(url):
    open_script= """
        <script type="text/javascript">
            window.open('%s', "mozillaWindow", "popup").focus();
        </script>
    """ % (url)
    html(open_script)

st.button('test', on_click=open_page, args=('https://www.mozilla.org/',))

I found and edited code from here.

I would like to use the button to open the popup window when the user clicks on it like its normal functionality. When the user clicks the first time, it works exactly how I want it to work. However, after the first time, it no longer opens a popup window. Instead, I have to reload the page for it to work again.

Does anyone have any ideas of how to allow this to run multiple times?