The claim that the US is not perfect and the claim that it is far less racist than the rest of the world are very very different.
If Henry the Eighth said "I am not perfect, but I have treated my wives far better than anyone else in the world", then the admission that he is not perfect should not be sufficient to dismiss factual challenges to the second part of the claim.
Does the US have to be better than the rest of the world? All counties, everywhere?
This isn't really even allowing for equality with say Canada.