REST API causes validationError when populating a field with type 'Media'
### Node Version

20.13.1

### NPM/Yarn/PNPM Version

10.5.2

### Strapi Version

5.8.0

### Operating System

MacOS

### Database

MariaDB

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

When fetching data from REST API  and populating a media field with query such as `GET /api/test-items?populate[TestField]=*` the request always fails with validationError "Invalid key".

`{
    "data": null,
    "error": {
        "status": 400,
        "name": "ValidationError",
        "message": "Invalid key related at TestField.related",
        "details": {
            "key": "related",
            "path": "TestField.related"
        }
    }
}`

API calls without populating the media field work normally.

### Steps to Reproduce

1. Create a new content type TestItem
2. Add new field TestField with `Media` type
3. Perform a query and populate the TestField using query such as `GET /api/test-items?populate[TestField]=*`
4. Inspect the query response and it should contain validationError 

`
{
    "data": null,
    "error": {
        "status": 400,
        "name": "ValidationError",
        "message": "Invalid key related at TestField.related",
        "details": {
            "key": "related",
            "path": "TestField.related"
        }
    }
}
`


### Expected Behavior

Query should be performed succesfully and return items matching the query or empty array.

### Logs

```shell

```

### Code Snippets

_No response_

### Media

_No response_

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