This is only a free rumination on one aspect of the role that cognitive dissonance plays in political belief revision, with particular attention to the role of perceived self-image.
We need look no further than the comments sections beneath a random sample of online articles or videos that contain overt political content, to realize that public political discourse is—more often than not—far from polite and respectful. Tendentious rhetoric and insults are common there. And no one is spared—even those who have (naively enough) found themselves attempting the conversation with a genuinely open mind about having their own views revised if a good argument that challenges them presented itself. This phenomenon is most pronounced in cases where clearly identifiable, dichotomous for/against positions are present. Now I'll sketch out how cognitive dissonance regarding perceived self-image can hinder belief revision, in particular how it can lead to a tendency of entrenching one's views—even those that have been previously held only tentatively. Central to this dissonance is the contribution of unpleasant experiences acquired from engaging in careless political discourse with anonymous others.
Here I focus on that entrenchment being precisely the result of cognitive dissonance rather than a rational process. One needs to look no further than the aforementioned discourse space, to find people engaging in disingenuous rhetoric or contemptuous criticism, which often escalate to outright insults. The insults in most cases center around the following personal attributes: knowledge, cognitive faculties, and moral integrity. It's safe to assume that most people don't ascribe to a self-image as described by such disingenuous criticism or outright pejorative combinations of epithets aimed at the aforementioned personal attributes. That is, people prefer to think of themselves as not being completely ignorant, especially when speaking out on issues that matter to them; also, unless a medical diagnosis states otherwise, they prefer to think of themselves as not being in any way cognitively impaired; and finally they prefer to think of their beliefs as not being morally questionable. So by making the occasional error of engaging in discussions on unmoderated forums, where trolls abound and where other interlocutors often display no more conversational etiquette than trolls, one puts one's self-image at peril, and as a result gathers painful resentment toward "the other side" over time.
As a consequence one will tend to become more entrenched in one's beliefs. Why? Because changing one's view (in cases of issues with clear-cut for/against positions) would almost amount to agreeing with those who had previously expressed contradictory views to one's own regarding their self-image. But this is unacceptable (to most), as it would be treading very closely to tacitly condoning views that contradict one's self-image. After all, conceding that someone who holds such contradictory views can be right about some things—in particular those things that prompted them to make a contradictory judgement regarding others' self-image—is not too far from saying that they may also be right about that very judgement. Or to put it another way, if someone is right about some things, then their judgement about those who fail to see those things as right may very well also be right. Mental discomfort resulting from such doubt is an instance of cognitive dissonance.
Generally, conceding to the correctness of a view previously held as incorrect may indeed prompt many to consider revising their self-image—there's an implication of certain unfitness of some of the aforementioned personal attributes—after all, how could one have been wrong for so long? In this case however the inclination to revise one's belief is additionally hindered because it entails agreeing with people who explicitly hold contradictory views regarding one's self-image. Hence the strong inclination to escape this cognitive dissonance, resulting in a tendency to (irrationally) stick with one's original position/view. Indeed, seeing the degree of emotional engagement in political discourse that people display, would make one think that it's not the broader issues that are being defended but something more personal.