This is what the US Supreme Court upheld, if you can't see the difference in these cases, then I just don't know what to tell you.
"1)That the charges preferred against petitioners on which they are being tried by military commission appointed by the order of the President of July 2, 1942, allege an offense or offenses which the President is authorized to order tried before a military commission. (2) That the military commission was lawfully constituted. (3)That petitioners are held in lawful custody, for trial before the military commission, and have not shown cause for being discharged by writ of habeas corpus.? The motions for leave to file petitions for writs of habeas corpus are denied. The orders of the District Court are affirmed. The mandates are directed to issue forthwith.
Big difference here! What trial? What Lawful Military Tribunal?
Read the rest of the decision. They can hold "prisoners of war" and "unlawful combatants" without trial until the end of the hostilities.
It is only after the end of hostilities that they have to do anything under the rules of war.
Don't help the enemy and you won't get caught up in this.