Populate query doesn't work after modifying controller

/**
 * tool controller
 */

import { factories } from "@strapi/strapi";

export default factories.createCoreController(
  "api::tool.tool",
  ({ strapi }) => ({
    async findOne(ctx) {
      const { id } = ctx.params;
      const { query } = ctx;
      console.log({ query });

      const entity = await strapi.db
        .query("api::tool.tool")
        .findOne({ where: { name: id } });

      const sanitizedEntity = await this.sanitizeOutput(entity, ctx);

      return this.transformResponse(sanitizedEntity);
    },
  })
);```

<i>This topic has been created from a Discord post (1220808502704865422) to give it more visibility.
It will be on Read-Only mode here.
<a href="https://discord.com/channels/811989166782021633/1220808502704865422/1220808502704865422">Join the conversation on Discord</a></i>