I think he's always thought Democrats were "better", even if that was irksome
In a 2004 interview, Trump told CNN's Wolf Blitzer: "In many cases, I probably identify more as Democrat", explaining: "It just seems that the economy does better under the Democrats than the Republicans. (Wikipedia)