It sadly seemed to take a while for the penny to drop in the CW that lines of men in the open against rifled muskets & artillery resulted in mass slaughter.
2/3 of all death during the civil war was caused by sickens and other none combat causes. Just having men in the army was deadly.
So dragging out the war for years is not a solution.
In 1866 The Austro-Prussian war started on the 14th of June.
On the 3rd of July the Prussians effectively won the war at Königgrätz.
Sure it cost them about 9.000 casualties (and inflicted about 44.000, with about 22.000 of them KIA/WIA/MIA the rest captured)
but they won the war in a quick and effective manner.
But since they where fighting Austrians armed with muzzleloaders the Franco Prussian war in 1870 is properly a better example.
This time the french infantry was way better armed than the Prussians. The Prussians still took the offensive against the french who was usually dug in and the prussians still won.
The war cost about 425.000 men their lives. But about 1/3 of the dead was from none combat causes.
Militarily the war was over after 2 month, with Napoleon III captured and most french armies destroyed and the entire war was over after 6 month. (had the French accepted the result in late 1870 the cost had been a good deal smaller)
And that is with the two side putting about 3.5 million men in the field in total...
Winning wars in a quick manner was much, much better for the country than dragging it out for years. And that require you to take the offensive and accept the casualties that follow. Because every day the war drag on more men die to sickness and the cost in manpower and money for the state goes up. (and birthrates go down when the young men are not home)
Napoleon I did not win by digging in, but by quick marching.
And by 1870 when both sides had much, much better weapons, wars was still not won by digging in.