In another question most of the answers claim that most children swear in normal life and/or already know swear words, so exposing child actors to swear words on the set is no big deal.
Minor child actors swearing on TV
It should be noted that members of the species Homo sapiens are highly variable and have a very wide range of personality traits. And that includes their attitude toward hearing and saying improper language. And that includes teenage and preteen kids as well as adults.
Army life during the US Civil War tended to spread a lot of bad habits among the soldiers. Most of them took up a lot of bad habits like drinking, smoking, gambling, using prostitutes, stealing from rebel civilians, etc. in the army, and that included swearing. And of course the hardships of army life gave soldiers a lot to swear about, even before the horrors of battle.
And that went for most of the drummer boys as well as most of the adult soldiers. But there was wide variation among them.
Former drummer boy George T. Ulmer, in A Drummer Boy From Maine: With Company H, 8th Maine Volunteers mentions meeting another drummer boy who was the most profane he had ever met, implying that the other drummer boys and Ulmer himself, though more profane that polite boys should be, must have used profanity noticeably less often than this one did.
And on the other extreme John McElroy in Andersonville: a Story of Rebel Military Prisons mentions "Little Red Cap" a small cute drummer boy who had refined and ladylike manners, even in military prisons.
So if most modern day children use swear words, there should be a wide variation in how much they do so, from those who do it exceptionally often to those who do so exceptionally rarely.
I myself used to be a real child, and I didn't and don't swear, and don't remember other kids swearing around me when I was a child.
So as I said, there should be a wide variation in all human attributes, including how much a child swears and/or knows swear words.