> Desertion has, historically, been a capital crime.

And it remained so for the US in WW2, although the sentence was carried out just once.

https://en.wikipedia.org/wiki/Eddie_Slovik

Major General Norman "Dutch" Cota, who was at the execution, called it "the toughest 15 minutes of his life". For context, Cota was also present at the bloodbath on Omaha Beach, where he famously rallied troops.