Encouraging the (what reads like a younger) person to value themselves enough to not tolerate their friends making fun of them for doing the objectively right thing here is not a "toxic environment".
Now, you blindly defending your own position "on behalf of others" due to some internalized battle you have with your perception of others attacking you IS toxic. You're a martyr for nothing but yourself in these scenarios, though you assuredly walk away feeling like a white knight (and again, to only your benefit).
So yes, "get new friends" following an illustrative anecdote that may take OP out of their own POV and see the same scenario objectively can be very important to some in this position - especially those who may be conditioned to think they aren't deserving of friends that DON'T make fun of them, dude.