Your code picks the current user session to get the result. So, the current user may not have to read permission to those content paths.Alternatively, could you print the query in the logs by your code and then run it in the CRXDE query tool?
Check Dispatcher Flush Replication Agents to be set up on AEM Author. If your Dispatcher Flush agents reside on AEM Publish, you must set up a parallel set on AEM Author with the setting of Ignore Default to be checked.
There are three things in your case:1. Provide current resource. Missing in your codecontext.currentResource2. Provide a resource for config. context.create().resource3. Config valuesMockContextAwareConfig.writeConfiguration
@vasgurug : Check https://experienceleague.adobe.com/docs/experience-manager-65/deploying/restructuring/sites-repository-restructuring-in-aem-6-5.html?lang=en for repository structuring in AEM 6.5