A few thoughts- as a 5th grader, he would be learning about his roles and responsibilities as a citizen as part of Building a Better World. I would hope that Den Leaders include the role to stand up for their rights as part of the conversion. I did with my AOL Webelos.
Maybe the boy's Den Leader followed this up with the boy explaining what the Pledge of Allegiance means to him - it is part of the Scouting Adventure. what an opportunity to discussion and understanding what the pledge is about (not just rote memorization).
This is an opportunity for the boy to explain his actions to his den. And that will reveal if this was just his dads influence, or if he took the lessons he is learning to heart. And an opportunity to discuss if he was learning the lessons the Boy Scouts hope he learns.
To the boys point, he has his jacket on, so not wearing or showing his scout uniform, but maybe a quibbling point. How about the boy not holding his hand over his heart?
last thought - where is the time and place to protest in uniform ever mentioned in any BSA literature? Scouts are expected to be Brave ( to have courage), Obedient (to the nation's laws ), and and Loyal (to the nation), but nowhere does it say he has to a robot. I am not a necessarily fan, and if one of my scout did it I would probably be upset as being disrespectful, at least in the moment. But he is not, he takes as stand. I would just expect him to be able to articulate why, on his own.