I'd be inclined to report the incident - possibly in writing - to the Head of Sixth Form. Sometimes children don't want a fuss made about problems at school, but it is always possible to make it clear that you want this dealt with in a confidential fashion without her being further distressed.Teachers should be supporting students and not undermining them.
Just in case it helps here is a story. No two stories about what happened when I was offered a place at Cambridge. he first involves my English teacher. I was a bright but sometimes argumentative student. She had said she wasn't going to give us practice for a particular type of exam question because she felt it was a harder question and we should just opt for an easier alternative option that would be provided. I said that seemed wrong. Surely if there was going to be a hard question we should get more preparation - not none at all? She became very annoyed and said that when I went to Cambridge, I would have 'the corners sharpened off me.' I remember thinking she'd got this wrong in her indignation and said that the corners would be rubbed off instead. But didn't point this out. (In those days you did a separate entrance exam, and so my offer from Cambridge was 2 E-grades.)
I didn't really mind about the teacher. It was small stuff. But I did mind about my Dad.
Immediately after my offer I had very excited because I fell for the place at interview. So I talked to my father about how I was not only pleased about the course, but that I believed this might make it easier to get a good job later on. My father didn't really reply but afterwards I heard him talking to my mother. He clearly felt that I was being boastful and said - in an angry, resentful tone - that if he and my mother hadn't sent me to the secondary school I attended I would never have got a place.
This anger, which I didn't fully understand at the time, related to his own childhood. He was brought up by his father's sister - and believed that if he had gone to the 'better' school where his father lived he would have had greater educational opportunities. He was a university teacher but had got stuck in his career and believed that he deserved better.
The sense of resentment toward me over this matter was clearly a lasting one. Over three years he never once drove me to Cambridge at the start of term or visited me or fetched me at the end of term. He said this was because Cambridge was too far from the city in the North West where we lived. (However he drove one of my brothers to Edinburgh and visited the other at Aberdeen.)
I did not invite him to my graduation.
I think all you can say to your daughter is that some adults - who should know a great deal better - have experienced disappointments and/or lack of opportunities in their life, and occasionally this results in their acting in an uncalled-for manner because something or someone reawakens that unresolved pain. . It's their 'stuff'. Nothing she has done and it will pass. The really important people are the ones who are happy for her.