^^^ Yes, and some Japanese are still racist towards Chinese and Koreans...
Although that’s really not a fair assessment of a country in general.
Of course racism exists in Japan— as it does in every country. I know many Black individuals that have worked in Japan and they’ve enjoyed/enjoying the country/culture/people. I have Black friends who have/had Japanese partners. So as much as you’re pointing out that racism exists in Japan, racism exists everywhere: The ME is not going to be welcoming to (for example) Asians who are looking for blue-collar work/labour; If a small population of Asian migrate workers are searching for work in the Democratic Republic of Congo, do you do think they will not experience racism? I was offered a position in the UEA earlier in my career: As a POC, they were all welcoming and very hospitable. But would they be so welcoming if I were just a migrate worker looking for minimum-wage labor…??? Of course not.
(BTW, if a Japanese individual is racist towards Black individuals, wouldn’t it be wonderful if they changed their mind with something as simple as appreciating an afro…??? Change has to start with something— and a fashion accoutrement, a hairstyle, could very well be that small gesture that brings people together rather than divide them further apart.)