text: Title: Inconsistent item assignment exception for `st.secrets`
  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
  
  `st.secrets` is read-only. When assigning items via key/dict notation (`st.secrets["foo"] = "bar"`), it properly shows an exception:
  
  ![CleanShot 2025-01-03 at 19 40 45](https://github.com/user-attachments/assets/628ad049-03a3-41b3-aa7c-fe3b3d6112b5)
  
  But when assigning an item via dot notation (`st.secrets.foo = "bar"`), it simply fails silently, i.e. it doesn't show an exception but it also doesn't set the item. I think in this situation it should also show an exception. 
  
  ### Reproducible Code Example
  
  [![Open in Streamlit Cloud](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://issues.streamlitapp.com/?issue=gh-10107)
  
  ```Python
  import streamlit as st
  
  st.secrets.foo = "bar"
  ```
  
  
  ### Steps To Reproduce
  
  _No response_
  
  ### Expected Behavior
  
  Show same exception message as for `st.secrets["foo"] = "bar"`. 
  
  ### Current Behavior
  
  Nothing. 
  
  ### Is this a regression?
  
  - [ ] Yes, this used to work in a previous version.
  
  ### Debug info
  
  - Streamlit version: 1.41.0
  - Python version:
  - Operating System:
  - Browser:
  
  
  ### Additional Information
  
  _No response_