A war is a war.
Torturing our enemies is just human nature. That will never stop.
The way a soldier functions correctly is by dehumanising the enemy to the point where they don't think they're even people anymore.
As a nation, you can either choose to have an effective army, or prevent all torture from ever happening, you can't have both.
To answer your question, I don't know. In war there are no rules, even though we wrote some down just for show and to pat ourselves in the back at how "civilised" we are.... when in fact we're not, or ever will be.
Do you think we're a different breed of humans than the ones who set up the jewish death camps during WWII? Sure, the guys at the top were next level evil, but the guys actually running the death camps on the ground were just normal dudes.
That shit can still happen again. In fact, it's happening right now in North Korea, and we're doing jack shit about it.
Disclaimer: this isn't me advocating for genocide, or mass murder of people. This is me explaining why torture happens, and why it'll never actually stop.