Remove the "view more/less" option from sidebar with a lot of items

Anyone know any custom CSS to make this work? I call this function at the top of each page.

def sidebar_setup():
    with st.sidebar:
    
        container = st.container()
        col1, col2 = container.columns([1.5, 3], vertical_alignment="center")

        col1.image(f"photos/{st.session_state["username"].capitalize()}_Profile_Pic_Circle.png", width=150)

        if col2.button(label="logout", key="logout_user_button", type="primary", use_container_width=True):
            logout_user()

I found this post, but that didnt work for me when i put it in this function or at the top of my page. Do i need to run it somewhere else or is there any other CSS that works?