When the Allies landed in Normandy and took the beaches, they killed many Nazi soldiers. They then held these areas. What happened to all the dead enemy soldiers? Mass graves or individually buried with markers?
Same question but for Allied troops killed behind enemy lines.
As with so many things, it varied widely depending on how fast the battlefield was moving, the weather, number of dead, and location. The faster the battlefield moved, the more ad hoc the burials became. Speaking from a U.S. and therefore western front/late war perspective), the Allies often buried Germans in semi-mass graves. Usually small groups of 2-5 in a grave if there was time for it. If there were a lot of dead, then perhaps a trench would be cut out by a bulldozer. Trenches and mass burials were much more common in the Pacific (Allies digging the trenches), of course there may racial tones to this activity).
In terms of Allied troops killed behind enemy lines (again, speaking mostly from a U.S. and therefore late war vantage point), the most common examples are air crews and then perhaps those who died during the Battle of the Bulge. Air crews were almost always buried individually, or if remains were co-mingled, then a mass marked grave associated with the aircraft. This was partially because it was often local villages and not large military units that got to the crash site first. Even remains that floated ashore usually got a marked burial. After the war, of course, American and Allied graves registration units canvassed all of Europe and even the Pacific to speak with locals about crash sites and local burials.
The most US casualties that occurred “behind enemy lines” or as the line moved in the wrong direction, was probably the Battle of the Bulge. Of course this happened in the winter and burial was not always possible. With the cold, the bodies also would not have posed a sanitary issue in the short amount of time the Germans pushed west. I have not seen extensive discussion of Americans buried in marked graves during this time. As Americans collapsed the salient and returned to the original lines, many American dead were found as they laid.