*I think a lot of it is to do with her being female and having an opinion.
Kate gets away with it because she keeps her mouth shut, doesn't express any opinions, etc.*
Not just female. Royals are paid handsomely to shut up and let people look up to them. It doesn't to to have an outspoken opinion because you limit the number of people who can assume you are gracious and noble.
To that end a Royal is far, far better off spending their time being charitable if they have concerns and want to speak on them, than expressing committed opinions on contentious issues. It makes their job easier because as soon as you commit to one side of an issue you step down from the pedestal for some people. The pedestal is what your job is.
Her Majesty gets that this her job. Princess Kate gets it. Meghan is young and has fire in her belly but will absolutely get there in my opinion. For now she doesn't do well at it which limits her pedestal power. Even Princess Diana for all the scandal, was all heart and few political positions.
Charles doesn't get it, which is why people dislike him.