text: Title: Pinned columns (column config) do not work when hide_index=True
  Body: ### Checklist
  
  - [x] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
  - [x] I added a very descriptive title to this issue.
  - [x] I have provided sufficient information below to help reproduce this issue.
  
  ### Summary
  
  As the title describes - this is a simple one
  
  ### Reproducible Code Example
  
  [![Open in Streamlit Cloud](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://issues.streamlitapp.com/?issue=gh-10385)
  
  ```Python
  import streamlit as st
  import pandas as pd
  
  test_df = pd.DataFrame({
      'Date': pd.date_range(start='2024-01-01', periods=10),
      'Value1': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
      'Value2': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
      'Value3': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
      'Value4': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
      'Value5': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
      'Value6': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
      'Value7': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
      'Value8': [100, 101, 102, 103, 104, 105, 106, 107, 108, 109]
  })
  
  col_config = {
      'Date': st.column_config.DateColumn(width="medium",pinned=True),
      'Value1': st.column_config.NumberColumn('Value1 Pinned', width="medium", format='%.2f',pinned=True),
      'Value2': st.column_config.NumberColumn(width="medium", format='%.2f',pinned=False),
      'Value3': st.column_config.NumberColumn(width="medium", format='%.2f',pinned=False),
      'Value4': st.column_config.NumberColumn(width="medium", format='%.2f',pinned=False),
      'Value5': st.column_config.NumberColumn(width="medium", format='%.2f',pinned=False),
      'Value6': st.column_config.NumberColumn(width="medium", format='%.2f',pinned=False),
      'Value7': st.column_config.NumberColumn(width="medium", format='%.2f',pinned=False),
      'Value8': st.column_config.NumberColumn(width="medium", format='%.2f',pinned=False)
  }
  
  st.write('hide index = True')
  st.dataframe(test_df, column_config=col_config, hide_index=True)
  
  st.write('hide index = False')
  st.dataframe(test_df, column_config=col_config, hide_index=False)
  ```
  
  ### Steps To Reproduce
  
  Run code. Using data_editor instead of dataframe gets the same result btw. 
  
  ### Expected Behavior
  
  If *any* columns are pinned, and hide_index=False, then pin the index column as well. 
  
  Or, make the index column configurable (example below) so the user can decide
  
  
  col_config = {
      'idx': st.column_config.Column('',width="medium", pinned=True),
  ...
  
  ### Current Behavior
  
  Doesn't pin with hide_index=False
  
  ### Is this a regression?
  
  - [ ] Yes, this used to work in a previous version.
  
  ### Debug info
  
  - Streamlit version: 1.41.1
  - Python version: latest 3 something
  - Operating System: mac
  - Browser: chrome
  
  
  ### Additional Information
  
  _No response_