"Self-righteousness" is an unfalsifiable accusation. When a person is accused of being self-righteous, if they defend themselves, then they are self-righteous because they believe they are correct and good; if they don't defend themselves, they accept the accusation of self-righteousness.
The same logic applies to "you just refuse to admit you were wrong." No matter how you respond, you reinforce the other party's accusation. In logic, this is called a "Kafkatrap": denying the accusation itself is treated as evidence that the accusation is valid.
Those who see through the magic trick will not