Why would warfare become mostly built upon large fortress firing large artillery pieces at other large fortresses? This is somewhat similar to the situation in R.E.D.C.O.N.. The biggest differences are that this is between 3 nations separated by sea thin enough that ETC & Combustion light-gas gun artillery can fire across it. There is also a small rebellion on the northern peninsula of one of the nations. There are more nations in this world that don't rely on the big fortresses. With these nations having foreign sponsors as well. More information on this world can be found here. The technology level is near future. Why would warfare degrade to being almost entirely fortress based between these nations?
Maginot Line and North Korea:
Fixed defenses are a response to a perceived CLOSE fixed threat. In France, the Maginot line was built because builders thought "We can only get invaded from here" and it might have worked a lot better if Belgium had built its part as well. Similarly, North Korea has one of the most insane sets of fixed defenses along its border with South Korea because the bulk of their likely enemy is in one place, and only likely to be attacked from one place.
Fixed defenses are actually pretty great - as long as the enemy can't simply maneuver around them or vaporize them with bigger guns (nukes). So your limited border access is useful in focusing the threat to specific points. The threat has to be constant, so your need for a pretty much permanent defense is worth the cost. There has to be little routine exchange between the countries (think the Berlin wall) because these kind of fixed defenses get in the way of routine commerce.
So you need your countries to be close and totally hostile for long periods but not actually fighting, willing to sacrifice trade with each other and not willing to simply kill everyone with nuclear war to dispose of the defenses.
Geography might provide the answer. If the terrain is very mountainous then it might be impossible to use any sort of fighting vehicles anywhere except mountain passes where they would be sitting ducks to bombardment from remote unseen fortress artillery targeted from numerous hidden local observation posts. Infantry attack might be almost as difficult on exposed steep open slopes with loose scree under foot against well directed artillery and a few machine guns.
Other geographical possibilities include swamps, marshes and mud flats overlooked from much higher ground where it is difficult to approach the high ground and impossible to do so without being spotted. Very wide tidally flooded coastal areas could be pose logistical problems for an invading force*. Very flat featureless terrain that runs abruptly into much higher terrain would similarly be very difficult for ground forces to approach as would glacial terrain.
Extensive underground defensive positions with multiple camouflaged gun emplacements could be extremely difficult to spot from the air and recon aircraft would themselves be vulnerable to missile attack from the surface. Complex terrain with broken ground, cliffs, bolder fields and ravines could make the situation even worse for the attacker.
If sufficient hidden and redundant fire points were built and underground weaponry was mobile in tunnels the situation should be very much in the defenders favor. The defender could simply ignore enemy aircraft and only engage enemy ground forces or could put up a certain limited level of resistance only to increase it to max effort when a ground attack was underway.
Politicians are in the pocket of artillery makers.
The artillery is expensive. Manufacture of ordnance provides good civilian jobs. Politicians like these jobs for people in their district and make sure the government keeps buying artillery. The artillery makers ensure that the politicians benefit from this as well by providing campaign funds and kickbacks.
And artillery is good PR. Artillery is spectacular! Politicians can show video of long, manly looking cannons with a subdued and menacing shine. Video of immense explosions that shake the camera. Gaping craters where enemies may once have been before they were converted into gaping craters by the power of artillery. Artillery means you mean business!
Neither side is enthusiastic about ending the artillery duel any time soon. On both sides artillery makers, politicians and people are satisfied. Soldiers are satisfied too. Hanging out in bunkers is a lot safer than running around with bayonets.
In relative terms, artillery isn't effective. Especially in current war scenarios there is little reason to use them. They are inaccurate, don't have the range and do too little damage. Planes and rockets dominate the current warfare. They pack a punch, are difficult to take down and are accurate. Together with combined arms, where you have multiple kinds of armaments that augment each other, you can set up an effective attack.
There's only two reasons why artillery is the dominant form. They are somehow more effective & accurate than other forms, or unavailability of the other weapons.
Planes and rockets are simply better than artillery, making it unlikely the artillery can truly compete. Mobility, accuracy, firepower and range are all better on planes and rockets. If artillery somehow got better than those, your scenario is unlikely to happen at all.
That is why unavailability is your best bet. The world can put sanctions on these countries. They might have the ability to make state of the art artillery and their shells, but the resources for better is unavailable. Without the ability to create, fuel or buy better weapons they might be reduced to artillery and smaller only.
Modern fortresses are difficult to destroy without ridiculous firepower or special weapons. The anti-air Fortresses vuild in Berlin are a good testimony to that. Direct hits from bombs and shells in WWII left them practically unharmed. Even when they were stuffed full with explosives to destroy them after the war was met with incredible difficulties, as well as that large parts of the buildings still remained upright even when it did crack.
So it is possible, but more likely that even in this scenario the commanders would resort to other tactics. Having Fortresses is nice, but they don't protect more than what's inside. They are immobile and can only deny area, never take it.
Technological counters to stealth, speed and evasion.
One of the reasons we don't just use massive fortresses everywhere is that a small group of planes or troops can just take a load of explosives up to them and blow them up cheaply.
As such, you need to have tech that makes such things impossible. Advanced visual, IR, and radio scanning techniques that allow the quick detection of any lone enemy and the quick dispensing of artillery or rockets to them which due to advancing in computing are incredibly accurate and dangerous.
Anyone foolish enough to have troops in the open will quickly be destroyed by the efficient weaponry of the fortresses be they in the land, sea or air.
Defense to be better than offense.
Stationary defenses have an inherent disadvantage vs mobile forces in that mobile forces can come into range, unleash a load of weapons, and quickly run away. Hit and run can wear them down.
To counter this you need a regenerating shield. I would suggest powerful digging engines. Strong generators in the core of fortresses could draw up massive amounts of dirt and stone from under the earth to block any non sustained attack.
Basically you just need stationary defenses and weapons to hugely outperform anything carried by a person or vehicle. Suppose the fortresses have rail guns with a 20-30 mile range and a 1,000 round per minute rate of fire which is actually sustainable since they are stationary and sitting on a millions of rounds. Well, no combatant or vehicle (autonomous or otherwise) can carry anything with a comparable range or rate of fire, so they get mowed down well in advance of being able to engage. Moreover, defenses that actually provide protection from these weapons are immobile -- whether they are just really thick heavy walls that can't be moved around or something really futuristic like a force field that needs to be hooked up to a stationary power plant.
This is almost exactly analogous to trench warfare, wherein you can fling artillery shells and send bullets back and forth, but armies that leave their stationary defenses tend to get mowed down. You just need to amp up the defenses and weapons enough to make the situation plausible with permanent fortress rather than temporary trenches.
Edit: rail guns and other technology centered around electromagnetism could be used to explain this technological development in a reasonably plausible way. In addition to the guns, you could pseudo-scientifically explain something like a force field with really powerful electro-magnets.
Trench Lines and Mobile Artillery
Trenches are almost synonymous with defensive artillery warfare. With railroads moving the big guns wherever cover would be needed. The only way through would be mobile artillery that could break through the defensive lines.
Then your land forces develop around artillery, both defensive and mobile.
The Iran-Iraq war saw heavy trench warfare in the modern era. As long as you make it easier to defend than attack by a wide enough margin, artillery will be the go to. Just have good anti-air.
Strong protections to channel attacks
I can not emphasize this enough. The only way you can use fortresses as your main protection is if the enemy can't just go around them. Therefore, you need something that will stop people from just maneuvering around.
In particular you need protection against aircraft and against ships. An army needs bridges, can be stopped by mountains, etc. An aircraft can fly anywhere. A ship can sail freely.
These protections do not have to stem from human effort. If fire dragons ferociously attack airplanes, and sea dragons, ships, that would work.
Once you have all attacks channeled, strong fortresses will be an excellent idea because you know where the attack is coming.
An Artillery Arms Race
I think an artillery arms-race could cause a situation like this. Say, for instance, the nations in question developed both very high-power long-range artillery and high-efficiency short-range artillery very early on. If their short-range artillery was efficient enough (capable of firing accurately and frequently), it'd make it difficult for another nation to get conventional infantry or fighting vehicles close enough to be effective.
Once that started happening, the long-range artillery would become much more valuable, as one of the few viable ways to attack the enemy. Its value would demand extremely stout fortifications to protect it against the (presumably) very powerful cross-channel shells. If the nations in question were close enough to each other, I can imagine them falling into a deadlock, where each keeps making advancements in artillery, which requires the others to invest most or all of their research, time, and resources into developing better fortifications and long-range guns.
Even if they have ideas for alternative ways to wage war, an intense-enough arms race would leave them with very few opportunities to develop those ideas. And perhaps the nations' workforce, and their research and manufacturing infrastructure, have all been depleted by the war. A bright-eyed young engineer might invent, for instance, a plane that can fly at a high enough altitude to drop bombs from beyond the reach of the short-range artillery. But how would they convince their commanding officer to spend valuable resources that could otherwise be put towards improving fortifications and building bigger artillery shells?