My custom route return 404 even if I do "ctx.status=200"

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

Environment: development
OS: linux-x64
Strapi Version: 5.4.0
Node/Yarn Version: npm/10.7.0 node/v18.20.4 linux x64 workspaces/false
Edition: Community
Database: postgres
 Is your project Javascript or Typescript: Typescript

### Describe the bug

My custom route return 404 even if I do `ctx.status=200`

### Expected behavior

It should return status 200  

### Screenshots

![Capture d’écran du 2024-11-25 07-34-11](https://github.com/user-attachments/assets/d4ed072e-71ab-477a-a4a6-ccaee2cdc144)

### Code snippets

Here is my controller function: 
```typescript
  updateAccountDetails: async (ctx, next) => {
    if (!ctx.user) {
      logger.warn("updateAccount(): user not found in context")
      ctx.throw(500, "Internal Server Error")
      return;
    }

    const schema = Joi.object({
      firstName: Joi.string().required(),
      lastName: Joi.string().required(),
      job: Joi.string().allow(null).allow(""),
      enterpriseName: Joi.string().allow(null).allow(""),
      is2FAEnabled: Joi.boolean(),
    })
    const user = ctx.user
    const result = schema.validate(ctx.request.body)
    if (result.error) {
      logger.error("updateAccount(): failed to validate schema", { error: result.error })
      ctx.status = 400
      ctx.body = { message: result.error.message }
      return
    }

    const data = result.value
    let res = null;
    res = await strapi.service("api::onboarding.onboarding").updateAccount(
      user.documentId,
      {
        firstName: data.firstName,
        lastName: data.lastName,
        enterpriseName: data.enterpriseName,
        job: data.job,
        is2FAEnabled: data.is2FAEnabled,
      }
    )
  

    ctx.status = 200
    ctx.body = {
      data: res,
    }
    console.log("Reached")
}
```
"Reached" is print to the console but I still have a 404 error. 

Sincerly, all of your "Strapi v5 brand new fancy breaking changes"  starts to piss me off.

 I wonder if It's not a better idea to switch back to the v4 which in my opinion more stable than this. I've gone through all of emotionnal states since I started to use this UNSTABLE BETA v5...  

I've wasted my time enough trying to clean all of your f*cking sh*it. If a version is not stable please don't advertise about it and above all : DON'T RELEASE IT.  
