An easy house rule to make the Friends cantrip more viable would be to change the trigger for making the target hostile from "when the spell ends…" to "if you fail a Charisma check to influence the creature…" Spells used to boost diplomacy shouldn't so easily result in fights
— Will Doyle (@BeholderPie) August 10, 2021
It says the target becomes hostile. That doesn’t automatically mean there’s going to be a fight. In fact, I’d argue that if the situation involves diplomacy, in most circumstances, an actual fight breaking out would be uncommon.