An unmarried child under 21 can hold L-2 status and may attend school, though not work. Where custody is shared, consent documentation from the other parent is a practical necessity for relocation and for travel, quite apart from immigration.
Status is one question, consent is another
Hypothetical example: a Hampton consultant is a separated parent of a twelve-year-old, with custody shared under a Canadian order. On the immigration side her son's position is straightforward: as her unmarried child under 21 he can hold L-2 status, attend school and remain until he turns 21 or her status ends. The obstacles are elsewhere.
Relocating a child across a border where custody is shared is governed by the order and by family law, and moving without the required consent can have serious consequences. Border officers also commonly ask a parent travelling alone with a child for a consent letter and a copy of the order. Resolve the family law question first, carry the documentation on every crossing, and keep a certified copy of any varied order with the immigration file.