When my brain interpreted ‘they’ singular to refer to a unspecified so-far unnamed person or an already mentioned group, it was definitely confusing to have it suddenly used to refer to someone who had just been referred to by name. This was definitely a novel use of ‘they’ for me at the time and I don’t understand why no-one else ever seems to have this kind of confusion. I did get used to it but I don’t think it’s as universal as some of y’all realise.
Edit: I just learnt the term ‘indeterminate antecedent’ from the Wikipedia article someone else linked. Thanks to them, I just got a little bit smarter. ;-)
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.