Do you know how many enlightenment figures were wildly racist, how many of them profited from slavery while pretending to stand for freedom? Scientific racism is a direct evolution from this.
As for whether liberalism now would lead to more of the same, of course it would, it has no built-in method for people to not be exploited, to discourage greed, to stop genocide, etc. How would you suggest we prevent any and all of this within liberalism?