Trying to be right is actually an attempt to cover up a belief you have that you are wrong/guilty.
It shouldn't matter in any discussion what other people say or claim or accuse you of. They are only doing that to themselves. But if it seems to trigger something in you and you take it personally and start to defend your rightfulness, it's because you actually believe you're not right.
Someone who is not guilty has no problem admitting to being wrong. It doesn't mean anything. It's not really ultimately true. It's just an admittance to being mistaken and laughing about it.
But someone who is guilty, has a major problem with that, because they can't accept that they are innocent, or that someone's accusation isn't true. They agree with the accusation and then try to create a false image of someone who is "not guilty" ie not wrong, ie right, in order to cover up their hidden belief in their sinfulness. A lack of true innocence produces a facade/mask of fake innocence.
Being right then is a state of unconsciousness, having made the belief in being wrong unconscious and having projected it onto someone else. It now seems like someone else is accusing you of being wrong, but it's really you accusing yourself of being wrong, projected outward, and it is now attacking you from the outside-in. The part of you reacting is a part which does not believe it is wrong, because it's a facade of innocence which projected the wrongfulness in the first place.
So if you're being right, and someone else seems wrong, you're really in a fight with yourself. The inner-you is right, the outer-you is wrong, but neither of you are really at peace.
It's helpful to admit to being mistaken. You really don't want to be right. You especially don't want to be right about how someone else seems to be attacking you, because that just means you're giving them credit and power over you.