Actually racists didn't "create" the word so much as early slaveholders were too ignorant, unobservant, dense, disrespectful, self-absorbed, and stubborn to bother properly pronouncing Spanish after doing business with foreign slave traders. This repeated mistake spread into common parlance where people didn't know any better and eventually wound up being reserved for insults as those educated enough to say the Spanish word for black started seeing it as a way of setting people apart and dehumanizing them to use the word almost like a substitute for man, woman, or person as though they were a different species entirely and thankfully started to refrain from doing so but to say it was invented for the purpose is trying a little too hard to give credit where it isn't due and where shame would be more appropriate if it actually were.
It's all very, very stupid. I'd die a happy man if that abortion of language were to disappear entirely before I make it to the grave. You really should not be proud of trying to keep ignorance born of even more ignorance alive especially not to promote yet more willful ignorance.