[v5] "Configure the view" not possible after updating nested, related components in a dynamic zone
<!--
Hello 👋 Thank you for submitting an issue.

Before you start, please make sure your issue is understandable and reproducible.
To make your issue readable make sure you use valid Markdown syntax.

https://guides.github.com/features/mastering-markdown/

Please ensure you have also read and understand the contributing guide.

https://github.com/strapi/strapi/blob/main/CONTRIBUTING.md#reporting-an-issue
-->

## Bug report

### Required System information

<!-- Please ensure you are using the Node LTS version (18, 20, or 22) -->
<!-- Strapi v3 is no longer supported, please update to Strapi v4 -->
<!-- If you are reporting a frontend bug please provide error logs after setting STRAPI_ENFORCE_SOURCEMAPS=true in your .env -->
<!-- This environment variable makes frontend errors easier to read and trace -->

- Node.js version: 20.5.1
- NPM version: 9.8.0
- Strapi version: 5.6.0
- Database: PostgreSQL 15.10
- Operating system: Debian 12 (bookworm)
- Is your project Javascript or Typescript: JS

Also tested with npm/10.8.2 node/v20.17.0 darwin arm64 - seems unrelated.

### Describe the bug

Maybe related to #20978 and #21059. But since those got closed as completed with a fix and im still running into that kind of issue there may be a new bug or some unnoticed edge cases.

When I try to configure the view of an element (/admin/content-manager/components/someelementname/configurations/edit) I get the following error with the "Something went wrong"-view:

```
Uncaught TypeError: Cannot read properties of undefined (reading 'attributes')
    at oDe (strapi-Cnl_eieY.js:2686:25230)
    at strapi-Cnl_eieY.js:2686:27306
    at Array.map (<anonymous>)
    at strapi-Cnl_eieY.js:2686:27071
    at Array.map (<anonymous>)
    at Sme (strapi-Cnl_eieY.js:2686:27062)
    at ComponentConfigurationPage-DaPOlQaD-DZxDLssy.js:1:3014
    at Array.reduce (<anonymous>)
    at V (ComponentConfigurationPage-DaPOlQaD-DZxDLssy.js:1:2982)
    at ComponentConfigurationPage-DaPOlQaD-DZxDLssy.js:1:1777
```

**Important to note:** The error is gone after a restart of the strapi-service. But it may be interesting to find the cause of that problem since regular users are able to trigger that, unable to restart the service.

### Steps to reproduce the behavior

1. create a collection type (lets call it "pages" for references) with a dynamic zone ("blocks")
2. create a component ("slider") which has some basic-fields (like "fluid") and a repeatable component "slides" which also has some fields (like "title")
3. add that "slider"-component to our dynamic-zone "blocks" of the "pages"-collection
4. create component ("content") that has a field referencing the previously created component (= a "content"-component may have a "slider")
5. add that "content"-component to our dynamic-zone "blocks" of the "pages"-collection
6. create some "pages" that use the previously created component
7. open a created entry within the content manager and go to the "Configure the view"-page
8. open the config of the "content"-component and go back (just to see that it works fine)
9. open the config of the "slider"-component, edit a field, click "finish" in the dialog, save the view
10. click "Set the component's layout" of our nested "slides"-component, edit a field and press "finish" in the dialog followed by a "save" in the upper right corner
11. click "back" in the upper left corner -> many "An error occurred while trying to open the form."-popups get shown
12. click "back" again so we're back at our page from step 7
13. important: Reload the browser-tab
14. try to do step 8 again and you'll the the "Something went wrong"-view with the shown "Cannot read properties of undefined (reading 'attributes')"-error
15. that error is persistent until the next restart of the strapi-service (then everything is fine again)

### Expected behavior

1. no "An error occurred while trying to open the form"-errors shown in step 11
2. no "Something went wrong"-view until a restart when you try to use the "Configure the view"-Tool

### Screenshots

Structure of the "pages" collection
![strapi_collection_pages_datastructure](https://github.com/user-attachments/assets/1a660eb3-670d-4e1d-9ab4-f718ce72eb18)

Structure of the "content"-component (and the "slider"-component) used in the "pages" collection
![strapi_component_content_datastructure](https://github.com/user-attachments/assets/3ba62f38-d4e2-4cca-befb-ff3c990a7338)

View after step 11:
![strapi_erroroccuredview](https://github.com/user-attachments/assets/7e74ca84-0bec-40d4-afda-c996198dabb9)

View after step 14:
![strapi_somethingwentwrongview](https://github.com/user-attachments/assets/28565921-0209-4185-ac8c-77b920eef803)

### Code snippets

No code to provide since the error occurs while using the ui.

### Additional context

As previously mentioned, the error may be related to #20978 and #21059.
