I did the same thing in my day. It was the Iraq war then, about half the school went into town to protest. (Including most of the boffins, so it's not like we just wanted to skip lessons). Fat lot of good that did of course, but I wouldn't oppose today's children doing the same.
Although just leaving school and going home wouldn't be much of a protest, unless it's protesting what the individual school is doing, which I don't think is the case with the climate stuff.
Much like a workplace strike, if a significant portion of the students walk out on the same day I think the school usually won't, and can't reasonably, do much. Unless they've locked the students in like a prison.