To dislike someone while acting like you get on/along
"John gets on really well with Daniel, but he (only) tolerates Daniel's son."
[Merriam-Webster]
1 b : to put up with · learn to tolerate one another
I don't like my boss, but I tolerate him.
Put up with conveys the idea you are referring to
to accept or continue to accept an unpleasant situation or experience, or someone who behaves unpleasantly:
- He's so moody - I don't know why she puts up with him.
(Cambridge Dictionary)