Technically, it is "unlawful" under INA 215(b) (8 USC 1185(b)) for a US citizen to leave or enter the US without bearing a US passport. However, there is no penalty for violating this section of law, and nothing will practically prevent the child from leaving or entering the US with their foreign passport and green card if it is valid.
As for leaving the US, the US has no exit controls, and airlines only care about the documents to enter the foreign country. As for entering, airlines will board the person as long as they have a green card, and US ports of entry cannot deny entry to US citizens who can prove their citizenship, even if they don't have a US passport. Of course, in this case the child probably won't have sufficient proof of their US citizenship, so from the immigration officer's perspective, there is uncertainty as to whether the child has become a US citizen or not. But either the child has automatically become a US citizen, in which case they must be let in, or the child has not automatically become a US citizen, in which case they can enter on their green card. So either way, the child can clearly enter.
Determining whether a child has become a citizen under INA 320 requires determining whether all the conditions are met. Some of those conditions may depend on evidence that might not be readily apparent at the port of entry, like determining whether the child is in the legal and physical custody of the parent. So I don't think the officers at the port of entry would adjudicate the child's citizenship anyway.
However, the child might not be able to keep this up forever, because eventually their green card is going to expires. If they apply to renew it, USCIS has much more time during the renewal process to determine whether the child has become a citizen. (And if they don't apply to renew it, they might have trouble boarding flights back to the US so they will either be stuck in the US, or might eventually be forced to apply to renew their green card or obtain carrier documentation.)