I accidentally compared my ex to their brother and I think it ruined the relationship
I am transmasc, my ex came out to me as transfem. We had been together a little over 7 years, we were married. While my ex was trying to figure themselves out, I at one point said their new hairstyle reminded me of their brother. Because truthfully, it did. Their brother also had long hair with middle-part bangs. Apparently this was a huge mistake, which I apologized for, asked for further clarification (whether it was bad to compare them to any family member, if this extends to things beyond looks [interests, etc]) and said I'd never do it again. It made my partner extremely upset at me, and they treated me very poorly in the relationship afterwards. It hurt a lot to have spent so much time with them for one mistake to cause critical damage, especially when we'd be around friends who compared their shaved face to people in popular media and they never complained to me about that being a problem. But I also understand that I was their partner so my words hold more weight.
I am so scared of making a similar mistake, or any mistake of that caliber again. Not even in a romantic relationship context but in a friendly relationship too. Is this something that you all would feel a similar hurt about? Should I avoid comparing someone to anyone? I am okay with making mistakes, but I don't want to hurt people...
EDIT: I am using they pronouns for my transfem partner because that's what is what I was last aware that they wanted me to use. I have not contacted them about or been updated about their preferred pronouns since we have separated.