OP is simply wrong that one must be outside the UK to apply for the Permit. The language is express:
"[T]he EEA citizen you’re joining is in the UK already or travelling with you to the UK within 6 months of the date of your application."
In this case, the child is "you" and thus the child's guardians, e.g. parents are "you"
In this case, the child would be travelling with the parents (pre-settled status) within six months of the application.
I can't speak to the exact timings here, but it would seem that the permit was the way to go and entirely appropriate for use on the child's return with parents to UK.