Aren’t Muslims permitted to commit certain “sins” if it saves the lives of others or yourselves?
Like if you were dying and only had pork you could eat it?
I think in both Judaism and Islam, the only thing you are not permitted to do to save someone’s life is to deny/blaspheme against/reject God.
But when we’re talking about war, it really ends up being nothing more than an attempt at an offensive gesture.
There’s a fairly old Talmudic rule of three things you can’t do even to save a life (including your own): murder (an innocent person), blaspheme, and commit sexually immoral acts.