That's surprising to hear. I have lived in Tokyo a fair amount of time (5+ years) and only experienced true racism, e.g. being not being allowed in a place for being non-Japanese, a handful of times, and those were mostly for what would be considered nighttime establishment that are a bit shady. Not doubting your experience, just putting this here as another data point.
Most of the times being treated differently was just other people being scared of talking English and avoiding me, but that usually fixed itself when they realize I speak Japanese.
Unrelated, but I think a lot of the foreigners in Tokyo are oversensitive to racism because they have never experienced looking different in their own country - that leads itself to interpreting all kinds of tiny acts as racist when something doesn't go the way they want. But in reality many of the acts have a different cause behind them, like the insecurity of the other person.
EDIT: Clarification