Really important topic OP. My son is 17 and I have tried to instil similar values to those you mention.
When my H walked out on us last year (married 13 years, not DS' biological father) my son's attitude was astounding. He thought a great deal of his step dad, they were close and I wondered if he might blame me given that H's main complaints were that I'd recently I'd become opinionated, let myself go, exercised without him, and didn't keep the house to his standards. I couldn't have been more wrong. He was appalled and upset and extremely thoughtful. I have done my absolute best not to lean on him, as I'm keen to keep the boundary between parent and child and for him to know he is safe and I am broadly ok. But he has been very mature, allowed himself to grieve, been a big support and made it very clear that although he knows marriages end all the time, he also knows unacceptable behaviour and attitudes when he sees them. He also realises how much of the mental load and unseen work I did as a wife and mum as well as my own job.
He has zero tolerance for any kind of prejudice including sexist, misogynistic behaviour. He sees nuances more clearly than me.
I'm honestly not sure which (if any) of my own actions may have helped. I do have a strong dislike for prejudice and judgement in any form to the point that some people probably find me frustrating. I have adhd and I think for me a strong sense of justice and fairness is part of that. Being judged has hurt me and I don't want to be that person.
I think maybe the fact that my son has always had a lot of female friends and is close to female cousins may have had an impact.
He has never been traditionally sporty, he's more musical and into water sports in a big way. Academically he's a proud geek. I think that this has meant he has ended up in friendship groups of both male and female where (and I choose my words carefully to avoid offence) most of them aren't especially typically 'female' or 'male' , it's all a bit more level in terms of typical gender roles with a massive range of personalities and quirkiness is embraced .
Many of them have been friends since primary school and although I expected maybe the girls and boys to form separate friendship groups in secondary school they haven't tended to- the group has just changed and grown.
I think caring about these friends, and respecting them has taught him and shaped him a lot. He's made plenty of mistakes too- and learned from them. He has also seen the fallout that has happened especially to his female friends when they have been victims of toxic masculinity.
I do wonder if for whatever reason never being part of a more 'sporty' or 'alpha' friendship group has been helpful in this way- as a byproduct he's not been part of a group of dominant boys . He's also naturally tall and strong and not interested in arguments so is very lucky that he's tended to avoid much in way of worrying conflict.
My ExH would probably criticise my son for being 'different' and say that he's missed out on being a more traditionally male child. He criticised me for not encouraging sport playing or watching- I wasn't even aware of it at the time it's just that I genuinely find it dull and DS didn't enjoy football/ cricket etc and TBH part of that was that he was not at all good at it. In exH's world boys should play sport, be tough, be respected, take charge blah blah. He's similar about the adult vs child relationship also- so young people should not answer back, have strong opinions, debate (he'd call it arguing), disagree etc.. I've tried hard not to bring my son up like that as I recognise the difficulties those attitudes have caused me. In fact me finally finding my self esteem and putting all that behind me was what began to put my H off 🤷🏻♀️.
I'm not naive enough to think DS has no issues, or me for that matter. But I am proud of his attitude towards woman and his understanding of the patriarchy.