Q. This may sound silly, but I have often wondered why, when putting an energetic, running toddler on an enclosed crib or playpen on Shabbat or when closing the door to children in a room, there is no prohibition of Tzeida or hunting?

A. Not an inane issue at all, as Sefer Hakovetz on the Rambam (H. Shabbos 10: 22) does rule that if a child fell into the water and someone fished him out using a fish net, he transgresses on a derivative of Tzeida or trapping – only permitted when life is in danger. Avnei Nezer (O.H. 189: 22) ponders whether an adult is different than a child. Shemiras Shabbos Kehilchoso (27 n. 112) quotes from Horav S. Z. Auerbach zt”l, that there is no Tzeida prohibition when capturing is done for the protection or rescue of the captured. Yesodei Yeshurun (4: p. 153) differentiates between common animal trapping and holding on to a human for shemira, as keeping him until trial or for a set time sentence, which is fundamentally different and not included in this melocho (besides being a “melocho sheino tzricho legufo.” See similar reasons in Chemdas Yisroel 1: kuntress Ner Mitzva. See also Tiv Haparsha Shelach in relation to the mekoshesh eitzim, that was jailed during Shabbos).
Tzitz Eliezer (15: 41) also assumes as a given reality, that children feel that they belong in their home and there is no Tzeida issue.
Horav Shlomo Miller’s Shlit’a opinion is similar

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a