Error when discarding changes in rich text editor.
### Node Version

20.17.0

### NPM/Yarn/PNPM Version

NPM 10.8.2

### Strapi Version

5.8.1 and 5.10.3

### Operating System

Linux (Debian/Ubuntu)

### Database

SQLite

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

When writing text in `Rich text (Blocks)`  in a component and saving the changes then discard them and the component is open,an error occur.
More info in the screenshots and the video.
Also reproduced on MACOS Sequoya 15.3.1. Also with PostgreSQL 14 database.

### Steps to Reproduce

To reproduce

1. Create a component Text in Strapi with Type Rich text (Blocks).
2. Create a collection type that uses this component.
3. Create an instance of this collection type write some text in the text component and publish it.
4. After publishing it, modify the content by adding some text and save it.
5. discard the changes with the accordion (in which there is the text editor) uncollapsed.
**Note**
The bug don't appear when  accordion (in which there is the text editor) collapsed.

### Expected Behavior

Changes will be discarded without the error.

### Logs

```shell

```

### Code Snippets

_No response_

### Media

Please see the video and the screenhhots for more informations.
- Reproduction of the Bug : 
https://github.com/user-attachments/assets/0848288a-02da-4acb-a5c2-701f2cdcc3a0
- Text component :  ![Image](https://github.com/user-attachments/assets/8635e46a-26c6-46aa-ae57-f7ee2f9afa0a)
- Collectiont type component :  ![Image](https://github.com/user-attachments/assets/005254d7-008f-4f27-8ce0-1390903e0f2b)
- Error message in Chrome browser (version : 133.0.6943.98) : ![Image](https://github.com/user-attachments/assets/19857cc7-3bc3-4f52-aefb-6857ce46df1b)
- Error message in Firefox  (version :135.0.1 ): ![Image](https://github.com/user-attachments/assets/40a48f11-11b9-4872-9d8e-cf2acecfac68)

### Additional information

_No response_

### Confirmation Checklist

- [x] I have checked the existing [issues](https://github.com/strapi/strapi/issues) for duplicates.
- [x] I agree to follow this project's [Code of Conduct](https://github.com/strapi/strapi/blob/develop/CODE_OF_CONDUCT.md).