When the dwarves were drawn into the wars of trench and mud, it was with a degree of surety and smug confidence. After all, if above ground is filled with danger, why not go below ground? They were experts in this matter after all, it should be a cinch.
They gained a good three miles with shock tunneling, before they were stopped.
The problem is, is that dwarves were not the only masters of subterranean tactics. It didn't take long for an enterprising goblin to make offers of a way to stymie the dwarven forces.
To be sure, dwarves may make their tunnels surer and swifter, and may be the stronger fighters...
But they weren't willing and able to dig flare shafts to signal for magical bombardment to collapse the tunnels.
The losses in those first few pitched battles were atrocious. The goblins, thanks to their collective beliefs and amoral masters, did not mind their casualties as compared to the dwarves, who felt each loss to be irreplaceable. And aside from that, even if the dwarves were loathe to admit it, the goblins had lost less than the dwarves in each confrontation.
Tunnelers are still being used; they're simply too effective to throw away. But now they are cautious, far less armored, and armed with far less hope.
They say that when dwarves die, over the course of a hundred years, their bodies harden, and turn to iron, or if they were particularly noble, gold.
A century later, there maybe some very rich mines in these battlefields.