I don't have much to go on with details here.
English movie. Anytime from the 2000's, give or take some time from the late 90's ('98, 99) till about 2008? Anyway, I'm sure the parts in question where part of a sub-plot.
There is a family of which either parent is re-married or in a new relationship. I'm going with the mother of the boy sees or is with a new man. White actors all of them. The boy must be in his teens, as he is still in school and going through what the parents assume is teenage drama.
Eventually, at some point in the film, the boy dyes his hair blonde. He keeps a beanie on (skull cap) to hide the hair colour. But he is eventually outed by the father at dinner one night(?)
It is revealed that he is in fact in a stage production of The Sounds of Music, wherein he plays one of the Nazi soldiers. The family then make an effort to see the play.
I recall the father or mother following him around and catching him outside a building with some other boys that also have dyed blonde hair. The building was the rehearsal stage.
As for the rest of the movie, I can't quite recall the main plots or actors. It might be that this was the main plot.
As I said, English speaking movie. Was set in either America or England. White actors. Sorry, but I don't have much else to go with here.