If there is a person consistently giving hurtful feedback and I would be in a position to get the person fired, I would do it. (And I have done it.) And I would not work in such a work environment. At least 50% of programming work in typical organizarions is about getting along with people.
But I have found myself in environments where I needed to tolerate this to a degree. And the only thing you can ultimately change is your own attitude. If you can see that hurtful criticism may be even more truthful than other criticism, it helps to develop the right attitude.
Of course, the dangerous part is that you may learn the wrong thing. Extracting constructive feedback from criticism that was not intended to be constructive requires a certain level of self-confidence and psychological safety that's only possible when it's an unusual event rather than a continuous drag on your self-worth.
In the professional world, giving feedback with tact and respect for the contributor is what we get paid for and enables a team to contribute to the company’s success.
If someone on the team doesn’t feel like they’re treated with respect, even when their work needs improvement, it doesn’t matter whether the feedback was given with good or bad intentions.