There has been no “switch”. That’s a narrative the Dems invented to minimize their own bigotry and history of racism. It’s amazing how Dems have selective historical memories. Your party created the KKK. You enacted Jim Crow laws and fought civil rights. You keep minorities on the Dem plantation with promises of socialist utopia. It’s your ideology. You own it. By the way, no GOP members are KKK. But you had quite a few, including Robert Byrd (D) WV.
No one does racism like the DemLeft.
The Dems have a lengthy history of racism and they’ve done everything they can to project the blame on others. All they’ve done is rebrand their dogma.
They spew misogynist hatred toward female conservatives, fling racial slurs at black Republicans and Hispanic Republicans for refusing to be exploited. They especially hate white Republican/Tea Party members and hurl psychotic death threats at them for good measure.
But they’re liberal bigots, so it’s okay.

Related articles:
https://www.thegatewaypundit.com/2023/05/texas-gop-rep-wesley-hunt-blasts-democrats-racism/

It is well to remember that since 1789, Democrats have gotten this Great Republic into every war we have fought; and, since 1854, it has – with one exception – been Republicans who have gotten us out of them.
Re the one outlier, today Harry Truman would most probably be a Republican.