I know. But generally, the gender of the noun describing a person correlates with the gender of the person described strongly.
Ok but my point is that when it doesn’t correlate, it becomes clear how grammatical gender is independent from the person’s gender.
It becomes even clearer when you consider all nouns by definition have a grammatical gender - inanimate objects, abstract concepts, etc, even though the thing described clearly doesn’t have a gender. Eg die Tür ist offen. Ich schliesse sie. (transl.: the door is open. I close it.) ‘Sie’ being the female pronoun used to refer to the grammatically female door.