Execution for desertion was never a widely used penalty. In fact, we've only done it one time since the Civil War; Eddie Slovik in 1945.
And it can be argued that Slovik was executed only because the Battle of the Bulge had started when Eisenhower was reviewing the case.
There was a certain level of panic in the Allied lines at the time (not desertions, but confusion over just where the advancing Germans were). SO Eisenhower thought he needed to make an example.
If Slovik had deserted much easrlier, or much later, he probably never would have been shot.
Just ‘cause we slacked off doesn’t mean we shouldn’t pick it up. Especially when dealing with scum that deserted TO the enemy.