I think CGP grey summarized the pattern nicely, and I quote: (timestamped)[0]
"The trick is to keep your identity separate from your opinions - they are objects in a box you carry with you and should be easily replaceable if it turns out they're no good.
If you think that the opinions in the box are who you are then you'll cling to them despite any evidence to the contrary.
Bottom line: If you want to always be right, you need to always be prepared to change your mind"
[0] https://www.youtube.com/watch?v=tlsU_YT9n_g&t=72s
I would also add my personal take that you should also presuppose that the person you're talking/listening to will have that attitude. Most people don't, but by merely starting from that point, conversation can have a positive turn when you get a glimpse of why they decided to put that opinion in to their mind-box.
Brecht wrote "Wer a sagt, der muß nicht b sagen. Er kann auch erkennen, daß a falsch war": he who says A, doesn't have to say B. He can also realize that A was wrong.
https://beruhmte-zitate.de/zitate/126572-bertolt-brecht-wer-...
We're actually making it required reading at my workplace.
I had this in my "eventually" pile (worthwhile but not immediately compelling), until I read this review by Scott Alexander: https://astralcodexten.substack.com/p/book-review-the-scout-...
Although I don't think it is possible to do it perfectly, but you can fix some things this way.
Any other techniques for dealing with this?
To get a better measurement of my own intelligence I think about my “dumb friend”, and then try to realize that that’s probably actually about how smart I am.
"Everyone is dumb...myself included" at least gives me room to change my mind, and an impetus to try and find things to change my mind.