I think I know what the problem is..
I added a general navigation to my provider with a browser which loads the pages, this all works perfectly, but if I loop through the items, I don't think my item is connected to my repository so I miss this part:
$page = app(PageRepository::class)->forNestedSlug($slug);
And therefor it does not know it is a child..