That doesn't invalidate his art, in fact I think a knowledge of his profound racism adds another level of terror to his stories, in the realization that racism is a primordial horror that can and does haunt us all. To wave all this away by claiming he was simply a "product of his time" is to profoundly misunderstand his writings.
I read a lot of Lovecraft as a young teenager, and it was only years later that popular culture started to call out his racism. When it started to gain traction, I remember thinking, "um... well, duh."
It is far more problematic with authors where the trait that is later "discovered" always seemed like an alien stain in their work. E.g. someone who wrote all about freedom and equality, but has some weird misogynistic moments in the books that everybody glossed over before, but now they stain the whole idea..