She even had the cheek to say ‘oh whatever, it doesn’t matter’. Like I had to settle for a different name to suit her
I would have been very tempted to reply with PA comments along the lines of "Oh, bless you, you do struggle with language, don't you!" or "Goodness, your memory is terrible, isn't it!" every time, before correcting her promptly and pronouncing it in an exaggerated drawn-out way, like you're teaching a new word to a toddler. Ask her to repeat it back to you, to check that she's got it! And ideally, do it very loudly, with others present. People like her think their silly childish ways give them the upper hand by upsetting you, but if you just react with pity and turn it back to an assumption of her incompetence, she'll just end up looking really, really stupid and not the smart mean-girl that she hopes for.
Barring severe learning difficulties, it's not difficult to expect somebody to know a colleague's name after 12 years. Even if somebody does have learning or speech problems, they could always tap you on your shoulder or come to your desk and smile rather than just arbitrarily assigning you a different name. It's such an aggressive thing to do, and one that's common among racists trying to put others down - "Hi, I'm Parminder" ; "Oh, I'll never be able to remember or pronounce that, I'll just call you Pamela".
If it's considered offensive and actionable to deliberately call a transgender person by their old male/female name - rightly so, as anybody should be allowed to go by whatever name they want, as long as it's not offensive - then how could it not be a disciplinary offence to deliberately and repeatedly get a non-TG person's name wrong? I could understand accidents if you knew Bruce for 30 years and sometimes forget when you see Caitlyn, but when it's a name that has never been associated with you, their position is thoroughly untenable.