I have had similar experiences to those expressed by both DAEVYLL and SOULFLAME with one exception.Just after engaging if there is still a noticeable gap with not much going on i quickly disable the phalanx,right click on the enemy again and then re-enable the phalanx mode.I noticed that this worked for the first time while testing units in custom battle.I was using Spartan Hoplites against full upgrade Sacred Band Infantry.This seemed to deal with the problem at least for me.