Will try to be the devil's advocate :-)
Firstly, he chose one special nation and race of people. He made it clear that they were unique, valuable and precious to him.
No. He did not choose a nation. He chose his devotee Abraham and blessed him that through him a nation would come into existence which will be his chosen nation. (Gen 12:1-3) It was not like selecting USA over the UK. It was bringing a community into existence. The Bible calls Abraham as God's friend. And having a special friend in my life doesn't make me a racist.
He demanded that no foreigner be able to freely mix without them renouncing their heritage and culture.
The nation of Israel was a nation with the Law covenant as a constitution. Any foreigner wishing to be a part of the chosen nation was supposed to follow this constitution. (Lev 24:22) Becoming an Israelite was akin to becoming a Jew and interfaith was not allowed in the law. He was not forced to be a part of it, but if he desired then there was no immunity for him.
Same laws apply here, because as a US citizen if you want to become a citizen of India, you are supposed to follow the law. (if you are found in possession of beef in one of the banned states or caught in a homosexual tangle, you would be criminally liable in the Indian court of law)
He then went to great lengths to make his people feel entitled and superior to all other races and nationalities. Their laws and culture made it clear they were of a higher standing.
I am not sure, how having a superior set of laws makes one racist? US has better laws than India, but that doesn't make US a racist country.
To reinforce this, massive genocidal wars were committed and celebrated- with the aim of ridding the world of those “awful” foreigners! It wasn’t a campaign to settle a difference, it was a campaign to wipe out their very being, genetic lineage and even the memory of them!
If the Canaanite were as disgusting as some historians say, then the genocide is acceptable for a social good of the greater number of people. Why do we seek to exterminate ISIS and other Terrorist outfits? Why do people still debate if US was right with the bombing of Hiroshima and Nagasaki? If we are still divided on whether this event that happened 70 years ago is a genocide/war crime or not, how could we effectively conclude that events that happened thousands of years ago were morally wrong?