They may study. They may not work. Dependent status ends at twenty-one regardless of how much of the assignment remains.
Study yes, employment no, and the age limit is absolute
Children admitted in L-2 dependent status may enrol in school and appear among the nonimmigrant classes permitted to study, so schooling is straightforward. They hold no employment authorisation, which matters where an older teenager expects part-time or summer work, and the spouse's employment authorisation does not extend to children. The harder limit is age: dependent status ends at twenty-one.
A child arriving at eighteen on a five-year assignment will need an independent basis, usually student status arranged in advance, before that birthday. Because L-1B itself is capped at five years with prior L or H time counting toward the total, a household should lay the assignment length, the cap and every child's birth date on a single sheet. Reading them together frequently reveals a conflict that reading them separately hides.