Treat them like POWs. They’re held until hostilities cease. No trial. No judgement. If the war ends in two months they get released soon after. Or, they could fight on for 50 years. I would actually prefer to be held as a POW than face life at a Supermax.