Not being pedantic here: my driver's license has my biological sex, height, and eye color. I presume to aid in identification since the image isn't great. That's always been my assumption.
My gender is on my passport and my driver's license, but it is not necessary for the transactions they are designed to deal with. My gender is not on my social security card, my credit cards, my gym membership card, or my student IDs when I had those. It's not even on my health insurance card.