I've seen white people do this all the time. and yes they are doing it to be racist.
We had a puerto rican lady in our office named Eileen, like the song "come on eileen", this white lady who i have personally heard singing along to that song many times because she listens to the same music station everyday, suddenly had no idea how to pronounce her name. Would routinely call her Elaine. or Elon or anything with an EL that wasn't Eileen. Despite being corrected on several occasions
Since i'm the boss, i told the white lady, "you work in finance. i greatly value attention to detail in this line of work. If you can't even remember how to pronounce Eileen properly, how am i to trust you with our books?" after that she never had a problem saying her name correctly.