In many romance languages, where there was never a separate word for "gender" meaning the stereotypes and baggage around sex difference, the word now used for "gender" (as distinct from sex - the classification system, not the carnal act) is often literally the word for "type" or "kind" or "category". For example, genre in French, género in Spanish, genere in Italian, gènere in Catalan, etc.
A lot of the types of "gender" on these published lists make much more sense in that context - they're not related to sex at all and should not be treated as if they are. This also leaves room for "genders" like catgender that necessarily exist side by side with sex differences.
If "gender" needs to be recognised in law, that would seem to be the way to go - make it either a completely separate category or perhaps a sub-category of "religion or belief", clearly distinct from sex and also NOT lumped in with the earlier protections for so-called transexual people and characteristics.