I’m a Democrat, but actually the very first vote I ever cast for president was for John McCain in the 2000 Republican primary. I figured he was the only one of the two, between himself and Dubya, who wasn’t crazy. I was right. (McCain got crazier in 2008, though). Dubya went on to win the Republican nomination, and the presidency.
I voted for Howard Dean in the 2004 Democratic primary, but he lost to John Kerry, who lost to Dubya in the general.
I finally went the distance with Barack Obama in '08, voting for him over the favored Hillary Clinton in the primary and again in the general.
I voted for Obama in both the primary and general in '12, but he was the incumbent, so it’s not relevant to the topic.
I voted for Bernie Sanders in the '16 primary; he lost to Hillary Clinton. Voted for Hillary in the general, who lost to President UGGGH.
And I voted for Elizabeth Warren in '20, who lost to Biden. I voted for Biden in the general, via early-voting.
Basically, in the primaries, I vote for the person I want as president, and then I vote Blue in the general unless they do something to really piss me off.