[Migration x Relation fields] One-to-Many published entries seem to be lost when migrating to V5
### Node Version

NODE 21.4.0

### NPM/Yarn/PNPM Version

NPM 10.2.4

### Strapi Version

5.11.3

### Operating System

Docker/Podman/LXC

### Database

MySQL

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

When I migrated from version 4 to 5, everything went well with the migration tool as well as with the database changes. Everything seemed fine at first, until I tried to edit, save and publish a Draft, I noticed that the relationship between some fields disappeared from the Published tab. The component is inside a Dynamic Zone. They appear in the API, but are not present in the UI.

### Steps to Reproduce

1. Finish the migration
2. Edit the content type
3. Check the Published Tab

### Expected Behavior

All the relation fields to be on both tabs

### Logs

```shell

```

### Code Snippets

**Main Page (Collection Type)**

```
{
  "kind": "collectionType",
  "collectionName": "funds",
  "info": {
    "singularName": "fund",
    "pluralName": "funds",
    "displayName": "Funds",
    "description": ""
  },
  "options": {
    "draftAndPublish": true
  },
  "pluginOptions": {},
  "attributes": {
    "ticker": {
      "type": "string",
      "required": true
    },
    "slug": {
      "type": "uid",
      "targetField": "ticker"
    },
    "fundName": {
      "type": "string",
      "required": true
    },
    "pageContent": {
      "type": "dynamiczone",
      "components": [
        "funds.morningstar-rating",
        "funds.invest-in-modal",
        "funds.reasons-to-consider",
        "funds.fund-summary",
        "funds.fund-details",
        "funds.options-details",
        "funds.etf-research",
        "funds.etf-documents",
        "funds.etf-disclaimers",
        "common.disclaimer",
        "common.seo",
        "funds.override-data"
      ]
    },
    "fundsCategory": {
      "type": "relation",
      "relation": "manyToOne",
      "target": "api::funds-category.funds-category",
      "inversedBy": "funds"
    },
    "fundsSubcategory": {
      "type": "relation",
      "relation": "manyToOne",
      "target": "api::funds-subcategory.funds-subcategory",
      "inversedBy": "funds"
    },
    "fundCategoryName": {
      "type": "string"
    }
  }
}
```

**Relationl component**

```
{
  "collectionName": "components_common_select_et_fs",
  "info": {
    "displayName": "Featured ETFs",
    "icon": "layer",
    "description": ""
  },
  "options": {},
  "attributes": {
    "funds": {
      "type": "relation",
      "relation": "oneToMany",
      "target": "api::fund.fund"
    }
  }
}

```

**Dynamic Zone**

```
{
  "collectionName": "components_common_featured_sections",
  "info": {
    "displayName": "Featured Section",
    "icon": "grid",
    "description": ""
  },
  "options": {},
  "attributes": {
    "featuredEtfs": {
      "type": "component",
      "repeatable": false,
      "component": "common.select-et-fs"
    },
    "title": {
      "type": "string",
      "required": true
    },
    "featuredInsights": {
      "type": "component",
      "repeatable": false,
      "component": "common.featured-insights"
    }
  }
}
```


After doing some tests, I noticed that the first time the dev ran after the migration, some duplicates were created in the database with the Draft components for both the Draft and Published tabs, which is why they are appearing normally first. However, if you save and publish the collection item, the duplicates are fixed, but the Published tab is not showing the data correctly.

See the two phases created in the database. The components_common_select_et_fs_funds_lnk table first created the duplicate relation for both Draft and Published (select_ey_fs_id 1 and 2) -- 232, 234, 248, 299 and 306 are draft items. This made the list correct in both tabs.

![Image](https://github.com/user-attachments/assets/78c00e08-8c7b-472b-9f16-aae1447e2c85)

After editing, saving and publishing, it changed to this. Which seems more correct to me because now we have 2 select_et_fs_id with the Draft and Published groups separately. But with this the items are lost on the Published tab side.

![Image](https://github.com/user-attachments/assets/5866cd7d-7e7d-4835-b5ea-e039666bc645)


### Media

https://github.com/user-attachments/assets/d46c2d4b-34da-4aa7-a4c4-27c8163d634b

![Image](https://github.com/user-attachments/assets/9061964e-dd58-4496-b19c-7ec8d7ed431e)
![Image](https://github.com/user-attachments/assets/7c8bc9b0-91e9-4aa4-ab67-1f02c319df46)
![Image](https://github.com/user-attachments/assets/9809cc17-e3e1-466d-b218-8c87caf4363c)

### 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).