Sometimes there’s no avoiding it, and you need to put more than one airline in the same reservation. That’s supposed to be the point of airline alliances, and joint ventures are supposed to work even better, though in practice they rarely do.
And sometimes it’s cheaper to book a codeshare or partner itinerary. Just know that this savings isn’t ‘free’ but rather comes at a customer service cost if there’s a schedule change or if your plans change.