
Hi @Marcos R. Santana Rivero , I tested locally and ran successfully.
I'm not sure if your problem is that you are working properly, but the data for newly created subsites in the last two months is missing.
I looked into this and learned that there was a recent update on SharePoint that SharePoint recommends a maximum of 2,000 lists and libraries per site, and 2,000 subsites per site.
If these limits are exceeded, the performance of the API may be affected. If you have something similar to this, it may cause some problems.
If your question is not related to this, you can feel free to leave a comment below and we will continue to investigate it. Hope that can help you. Best Wishes.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.