Remember that the fortification is not simply « a wall » but « a major defensive network » (Rule 12.7).
It does affect units that attack « across that border », so you can circumvent it, but if even one unit attacks from the fortified border, then all land units will defend at +2 for the first round, as there is no other way to play the combat round.
However, you could argue that the two first strikes at 5 from the fortification itself should only hit units that actually crossed the fortified border…
As @Caesar-Seriona pointed out : just don’t do it. If you have enough units in place to attack from the unfortified border, then you should only send these into combat.