CLONE: BUG V5: tries to find Metadata after remove a component
### Required System information
Node.js version: 20.9.0
NPM version: 10.4.0
Strapi version: 4.20.0
Database: PostgreSQL
Operating system: Linux
Is your project Javascript or Typescript: TypeScript

### Describe the bug
I removed a component, because I misspelled a letter. I was still using it inside a collection in Content Manager. Obviously, after delete it, disappeared. But now, I can't modify the entry of the collection, it says:

`Error: Metadata for "sections.mycomponent" not found
`
### Additional context
The obvious solutions has been create the misspelled component again, then delete the stucked entry, and then remove the component again.

### Related tickets
This is a V5 clone of #19535 to track the V5 PR