With the defeat of Sauron, how is it that Gandalf and the combined armies were rescued when the land that they were standing on remained intact while most of the Orcs buried with the collapse of the land around them?
There is no explanation other than it's Peter Jackson's dramatic interpretation of what happened on the Field of Cormallen.
And even as he spoke the earth rocked beneath their feet. Then rising swiftly up, far above the Towers of the Black Gate, high above the mountains, a vast soaring darkness sprang into the sky, flickering with fire. The earth groaned and quaked. The Towers of the Teeth swayed, tottered, and fell down; the mighty rampart crumbled; the Black Gate was hurled in ruin; and from far away, now dim, now growing, now mounting to the clouds, there came a drumming rumble, a roar, a long echoing roll of ruinous noise.
The Captains bowed their heads; and when they looked up again, behold! their enemies were flying and the power of Mordor was scattering like dust in the wind. As when death smites the swollen brooding thing that inhabits their crawling hill and holds them all in sway, ants will wander witless and purposeless and then feebly die, so the creatures of Sauron, orc or troll or beast spell-enslaved, ran hither and thither mindless; and some slew themselves, or cast themselves in pits, or fled wailing back to hide in holes and dark lightless places far from hope. But the Men of Rhûn and of Harad, Easterling and Southron, saw the ruin of their war and the great majesty and glory of the Captains of the West. And those that were deepest and longest in evil servitude, hating the West, and yet were men proud and bold, in their turn now gathered themselves for a last stand of desperate battle. But the most part fled eastward as they could; and some cast their weapons down and sued for mercy.
"The Field of Cormallen", The Return of the King -- JRR Tolkien