There is a disorienting experience that principled people know well. You name a real problem, you push back on something genuinely wrong, and somehow the conversation turns, until you are the issue. Not the thing you pointed at. You. The group's discomfort gets relocated onto the person who made the discomfort visible. If that has happened to you more than once, you are not imagining it, and it is not proof you were wrong.
Why groups turn on the messenger
Groups have a strong interest in their own cohesion, and a member who challenges the shared story threatens it. Social psychologists have documented what is called the black sheep effect: people often judge a deviant member of their own group more harshly than they would judge an outsider behaving the same way (Marques, Yzerbyt & Leyens, 1988). An in-group critic is more threatening than an external one, because they challenge the group from inside, so the group's response can be disproportionately severe.
In families, the same dynamic has an older name. Researchers described how a family system under strain can manage its tension by designating one member as the problem, the scapegoat, treating that person as the source of difficulty that actually belongs to everyone (Vogel & Bell, 1960). The one who names the dysfunction is the most convenient candidate, because making them the problem also discredits what they said.
Why it hurts in a specific way
Being made the problem for telling the truth is a particular kind of painful. It is not just rejection. It is rejection plus the implication that your integrity was the offense. You can start to doubt yourself, wondering if you really are too much, too difficult, too intense, exactly as the group's reframing intends. The reframing works precisely by making you question the instinct that was, often, correct.
How to carry it
You do not have to become quieter or stop caring about what is right. But you can hold the experience more wisely.
Name the move when you see it. Recognizing the black sheep effect or the scapegoat dynamic in real time loosens its grip, because you can see that the shift from the issue to you is a predictable group reflex, not a verdict on your character.
Separate the message from the delivery. Sometimes being made the problem is pure group defense. Sometimes the truth was right but the delivery handed people an easy reason to dismiss it. Honest reflection on which one happened keeps you sharp without making you doubt your core.
Find your allies. Even one person who agrees out loud dramatically changes the dynamics of dissent, a finding that goes back to the earliest conformity research. You were never required to stand entirely alone.
Standing up for what is right and being cast as the problem is one of the oldest costs of integrity. It says far more about how groups protect themselves than about anything wrong with you.
References
Marques, J. M., Yzerbyt, V. Y., & Leyens, J.-P. (1988). The black sheep effect: Extremity of judgments towards ingroup members as a function of group identification. European Journal of Social Psychology, 18(1), 1–16.
Vogel, E. F., & Bell, N. W. (1960). The emotionally disturbed child as the family scapegoat. Psychoanalytic Review, 47(2), 21–42.