I'm currently writing a manuscript with a female protag, and I have to say that I really disagree with the idea that boys' thoughts, dialogue, and behaviors should be written in a way that's categorically different from girls' (and vice versa). I do run my pages past female critique partners because there are clearly some broad differences in the way boys and girls are perceived and treated on a societal level - standards, expectations, assumptions, etc. But in terms of the characters themselves? I can take every single prefab gender-defined characteristic in existence and name a person I've known who completely upends it, starting with myself, my wife, and my children. If you've written a character of a different gender who doesn't fit the preconceived notions attached to that gender, it may not be because you've written that gender inaccurately; it may be because you've written a character who doesn't fit the preconceived notions attached to their gender. Which is another way of saying you've written a character who's a unique individual, as all characters should be.