This issue has cropped up a few times on here - there you are, getting along nicely with someone you like and then bang! they say something like TWAW, and you realise there's a gulf between you that you didn't know existed.
On a purely emotional level, it's difficult, as it may result in the loss of a friendship, and that's always sad.
To answer DoIEver's question about only being friends with people you agree with - it depends on the subject of disagreement. If they like coffee and I like tea, no problem. But some things are more fundamental and if there's a big mismatch, deep conversations are going to run aground on the jagged rocks of differing perception of basic reality.
So of course you can 'pal around with' someone with different opinions, as long as they are not really offensive, but a deeper friendship with someone who does not share the same basic values as you? Don't think so.
Sometimes you can be tootling along nicely in a friendship until an issue is brought into sharp focus by some contemporary event - a racist killing, an attack on a hotel housing migrants, a war somewhere in the world, a colleague's pronouns..
and suddenly there's that gulf between you.
I had that experience with a group of friends I had been close to for years, they completely shocked me one evening with a conversation full of racial stereotyping - not particularly negative, but mindless stereotypes about what different people are 'naturally' good or bad at. When I objected to what they were saying, I saw their attitude to me changing, as my attitude to them was, and we have been polite but not very friendly since.
It's very sad, but no, DoIEver, I couldn't be friends with them because on something very fundamental, I do not agree with them.
shabanga - I wouldn't tackle this head on, I'd have a couple more conversations, keeping it light, to see what the lie of the land is, and how much of a deal it is for you, and then proceed in whatever way feels best for you.