throwing in plugins middlewares/policies always result in internal server error.
### Describe the bug

Throwing an error in plugins always results in an internal server error since InstanceOf checks if the constructors are the same
The thing is that all plugins gets there own copy of the constructor from the code in the library

### Steps to reproduce the behavior

1. create a plugin
2. throw an application error (any error would work) of middleware above global error middleware
3. You get an internal server error instead of the error you thrown

### Expected behavior

to get back in the API the error you have thrown

### Code snippets

https://github.com/strapi/strapi/blob/146a31b564bc8232686331f6b28f7ff966817963/packages/core/core/src/middlewares/errors.ts#L15
You do an  InstanceOf checks if the constructors are the same
The thing is that all plugins gets there own copy of the constructor from the library

