The instinctive behavior (on average) of girls seems to be more compatible with living in boxes and following ostensibly (from the child’s perspective) arbitrary rules.
The boy could have a very different experience from the girl by running into disproportionately more <behavioral correction>, and however healthy <behavioral correction> is in the family system (and wherever else they are exposed to) could determine whether the child more exposed to it has issues while the child less exposed to it wouldn’t, despite living in the same environment and being treated the same relative to their actual behaviors.
I’m not asserting that this has happened in your case, by the way, your account of the situation just doesn’t rule it out. I wonder if you’ve considered this?
I think ADHD is something you are born with, but there are many other things that can cause similar difficulties, including trauma. And as the linked article mentions, neurodivergent children are more likely to have parents who suffer from similar difficulties, which may increase their chance of suffering some sort of childhood trauma.