This extends to actions vs beliefs too.
F.ex. one of my most altruistic and charitable friends is a Trump supporter
She's run a Christmas time charity for 10 years, solely out of the goodness of her heart, to ensure that families in our community who are struggling get what they need for a happier holiday in tough times.
It's a non-trivial 6 months of work, between making prizes for donation-driving lotteries, attending events and promoting, and then finding the most cost-effective deals for the families.
So I choose to say "She's a better person than most I know, in some ways, and disagrees with me in others. Worth friendship."