They may frame it in weird ways, emphasize weird things, or lie about particular issues, but by and large politicians campaign on their actual beliefs.
I think Vivek is an exception. He used to sit on the Ohio COVID board and promoted mask wearing. He also has ties to Soros.
Has his campaign been about opposition to mask-wearing? (Also, like, people
do change their minds sometimes, particularly on issues that are new. Nobody doubts DeSantis's anti-lockdown credentials, but it is actually true that when the pandemic began he locked down Florida.)
(Also, it
is true, for many politicians, that at a certain point 'will to power' can become their main motivation, and they'll pivot to anything to gain it. At certain points in the 2016 campaign Trump tried -- but failed! -- to pivot away from opposition to immigration; I've recently reread some pieces about the 1940 campaign, and Willkie, whose entire nomination campaign was based around opposition to isolationism, tried at the end to pander to isolationists to win their votes. That sort of thing does happen. But politicians don't, like, lie whole-cloth about their views.)
The issues Ramaswamy has emphasized are opposition to civil-rights bureaucracy (and there's evidence that he's held this position since he was literally a middle schooler) and greater skilled immigration to the United States (which makes sense given the rest of his background). Much of the rest of it seems to be stuff he doesn't care about, or which is a calculated persona; he said at some point in some interview that he was opposed to foreign aid for Israel, but then notably didn't defend that position at the debate, because I think he doesn't care and is just sizing up what the electorate wants on that issue. But he hasn't budged on his fundamental themes.