Plasma Shields
Traditional fortifications went out of style because of a the linear-cube law. As world builders we should all know the square-cube law by now, but the linear-cube law is kind of the same but even more unforgiving. As the scale of a fortification increases at a cubic rate, its defensive capabilities go up at a linear rate. Imagine you have a wall, 1x2x10 meters, and you triple it up to 3x6x30 meters. you have increased is mass/size/cost 27 fold, but only tripled its ability to resist pentation.
Because of this relationship, in a contest between scaling up a weapon to pernitrate a fortification and scaling up a fortification to resist pentation, the weapon wins hands down... but what if you had a way of defending a large area that scales up at a linear cost? That's is where plasma shields come it. Unlike a wall, a plasma shield takes a source of energy and used an array of lasers to create a plasma barrier just in the path of an incoming weapon. Because its potential is not spread across your whole perimeter at any given moment, it means that if your shield array doubles in size, it takes twice as powerful of an attack to break through... or it can split its beams to focus on twice as many simultaneous attacks of equal power... or you could have all of your lasers target threats independently to wipe out a large swarm of cheap slow moving drones in the blink of an eye.
Current designs of plasma shields are powerful enough to stop High Energy Lasers, block explosive shockwaves, and maybe detonate missiles, but they are relatively small systems designed to go on a plane, but a much larger shield powered by nuclear reactors could potentially stop all sorts of weapons.
Now, the defender has a true advantage. To attack a fortress guarded by a shield you need to attack it with vehicles which are much more expensive than fortresses by size, and harder to make on a really big scale. So if you just make a shield array large enough, and attach it to big enough of a powerplant, it would become virtually unassailable unless you attack it with a force of truly extraordinary size. Even a nuke could be blocked by such a system if the lasers cause the detonation system to explode from the wrong point of origin before it reaches its designated distance.
... if shields are not in your setting, any other adequately advanced active defense system should work. Plasma shields just scale up best IMO because so much of the system is power generation which can be done internally on a particularly large fortification.