You probably already know this, but it's worth saying out loud.
If you put on white skin, go into a black ghetto, and start yelling racial slurs, you will get lynched. Not coming out of that one alive.
It's not called lynching though, is it?
Fundamentally "racist" southerners lynched based on exactly the same dynamics. Blacks would go into a closed white community, act antisocially, and draw the predictably lethal response. P.S. the "racists" were suspicious of blacks because the act of invading closed communities filters for particularly antisocial blacks, in exactly the same way that a white in a ghetto is likely there to cause trouble. They were treated as if they were there to start trouble, because like 50% of the time they were there to start trouble. Being present at all is prima facie evidence of mens rea.
The word has been twisted because one kind of violence is politically useful and the other kind is politically awkward. It's useful to the slavemasters if you're upset asymmetrically, and of course the slaves obediently get upset in such a way.