Walls, like the Maginot LIne, succeed if they force the enemy to find a different way other than the easy way. The Muzlims defeated the walls at Constantinople, but it took them 700 years and a new invention.
You are correct active defense is the only workable defense.
Patton “Fixed fortifications are monuments to man’s stupidity.” it was not completely true but a good working view for the most part.
The Maginot line was a success in that defended the section of border that it was supposed to, it was a failure in that the people of France thought it protected all of France.