Despite a long career in the military and large corporate operations environment, I’ve never had a time where I had to accept an order against my morals. I did have occasion to counter that a different way of accomplishing the mission needed to be found but that was to kept operations safe and legal for the type operations we were tasked for.
Unnecessarily choosing high losses for people or equipment was foolish and can jeopardize future operations, I was of the rank/position to influence safe and efficient operations for my people and weapon systems. As to enemy combatants, we actually dropped warnings both for combatants and non-combatants on how to not to be a fatality as overwhelming force and/or forces would have dramatic consequences in their area in the coming hours. Non-combatants were especially warned not to engage as they would be given no protections once engaging military personnel.
Keep in mind, any true stories or depictions in movies, while based on true it has probably been dramatized for entertainment or advocacy for a cause. While normal bell curves would say human nature will always have outliers; they are smaller percentages and have mechanisms for reporting and review. I’ve used that system, and while many may would compromise reporting for fear of discipline or promotion opportunities, there are still ways to report anonymously. So can and do those outliers happen, yes I’m sure there are occasions, but are they mainstream operations, no, not my experience over a very long career.