The solution to racism is education.
People who know that the reasons for economic and political uncertainty are complex and involve many factors of which race is one of the most insignificant, are less likely to be swayed by racist arguments and therefore less likely to blame a convenient scapegoat for their misfortunes.