This is a rule within AEM where a query will stop after traversing a certain amount of nodes.
There are 3 ways in which you can overcome this:
1. Add more identifiers to your query which will narrow it down and search for less nodes.
Example: sling:resourceType, fulltext etc.
Why this works is because there are indexes for many JCR properties which are provided within AEM OOTB.
If you don't have any other identifiers, then
2. You would need to create a custom index which will then decrease your query time and also not traverse through all these nodes.
Reference: https://helpx.adobe.com/in/experience-manager/kb/create-custom-oak-index.html
The third way (is not a recommended approach if you are planning to use this query in a PROD,STG environment ).
But, if you are using it as a one-time thing in your local instance,there is a way where you can change the number of nodes traversed.
3. In your /system/console/configMgr, change the number of in-memory limit.
