One of the reasons we ultimately went to war with Japan, was because in the 1920s we stopped immigration from Asian countries, especially Japan. The Japanese saw it as an insult, and it soured them on the Americans.
Well, to some extent that’s true but the Japs wanted to create The Greater East Asia Co-Prosperity Sphere and chose war to bring it about . And as far as racism? The Japanese were and still are extremely racist, especially towards other Asians.