Surprisingly, recent research seems to imply that the opposite is true.
In their 2018 article, Representations of reliability: The rhetoric of political flip-flopping, in the Public Relations Review journal, Bentley & Vogue describe the results of a qualitative analysis of 141 political flip-flops, in order to try to understand the best approach to mitigate negative effects on the politician. In particular, they identify flip-flops where, as in the question:
For example, candidates may take more extreme positions to please their base during primary elections, and then moderate their stances to attract swing voters during general elections.
They identified four basic strategies:
Ignore the flip-flop, by evading questioning and refusing to acknowledge a change in position.
Deny the flip-flop, by arguing that the previous position was misrepresented or misunderstood.
Justify the flip-flop, by arguing that the change in policy was necessary to maintain another, more important position, and therefore not a sign of hypocrisy or untrustworthiness.
Repent, admitting that the previous position was wrong/a mistake, and do not try to defend it.
They found that the most successful strategy to take particularly depended on whether key stakeholders would care about the flip-flop or not. If not, the best strategy was to ignore or deny the change in position. The results seemed to indicate that it was only worth trying to justify or explain the change in views if there was a high chance that a significant portion of the traditional voter base for that candidate would be likely to change their views based on the new position.
These findings appear to be corroborated by the findings of McDonald, Croco & Turitto in their 2019 article Teflon Don or Politics as Usual? An Examination of Foreign Policy Flip-Flops in the Age of Trump in The Journal of Politics. They examined the response of voters to two contradictory positions taken by President Trump, firstly his position on American involvement in Syria, and secondly his position on the use of trade tariffs against the EU. The participants were split into three groups. The "action" group were told that Trump has made an action on foreign policy, without explicit knowledge of the flip-flop, the "reversal" group were shown an article which pointed out the contradiction in position, and the "control" group were shown an unrelated news story. The views of the participants on the issue at hand before the experiment was also recorded.
The findings indicated that if voters had access to the information about the flip-flop (i.e. the reversal group), they were far more likely to be able to identify the change in position. This would seem to support the hypothesis that greater access to information leads to greater damage to pivoting politicians. However, the results also showed that despite being able to identify the flip-flop, the participants' approval of the change in policy was far more reliant on whether the final position that Trump took overlapped with their view on the issue. That is to say, that the act of pivoting was to an extent only important to a voter if the final position contradicted their personal views.
In conclusion then, studies seem to show that although the dawn of the Information Age allows voters to more easily identify a positional pivot by a politician, the damage, or lack thereof, to the politician is far more reliant on voters' view on the issue. This seems to suggest that flip-flopping can actually help a politician, if the current position is sufficiently unpopular with the electorate, and being accused of hypocrisy is far less of a concern than it was in the past.