I remember fixing this in a personal build a while back through the deployment zones, it is hardcoded that if two armies attack a settlement at the same time one will spawn infront of it and the other one in the back, no matter from what tile on they actually attack from the strat map. Only reinforcements will also come from their respective tiles on the battlemap.
So the only things that affect these hardcoded deployment zones are either stratmap water from oceans/seas (Esgaroth uses this technique) or the defenders deployment zone, which can be changed in the IWTE.
In my fixing attempt I extended the defenders deployment zone to cover all the area in the back of the settlement which actually forced both attacking armies (if two armies attacked) to spawn inside the same deployment zone infront of the settlement, since this was a somewhat not too clean fix I didnt want to provide it on the forums. Also I havent tested if/how it affects pathfinding for the attacking units.
Found this screenshot:
