The filter returns more items than it should

System Information
  • Strapi Version: v4.11.1
  • Operating System: Windows 11 / Ubuntu 22.04.2 LTS
  • Database: Postgres
  • Node Version: v16.20.1
  • NPM Version: 8.19.4
  • Yarn Version: 1.22.19

Filter return more items than it should when passing 100 values in the filter array,

Example 1, where the error occurs when passing more than 101 ids in the filter:

Example 2, where 101 ids are sent and the return is correct:

I know that there is a file in Strapi which defines some API settings, mine currently looks like this:

rest: {
    defaultLimit: 25,
    withCount: true,

When I need everyone in the return, I usually pass the limit: -1, but I don’t understand why the search is returning more items when more than 101 items are sent in the filter, any ideas?

I found the configuration I needed to prevent this from happening: Middlewares | Strapi Documentation