It was awful in the older Battleground series.
How to avoid this is to keep infantry/cavalry reserves handy. Dont push your Allied infantry out too far without proper support units.
I like to keep my infantry "shoulder to shoulder" meaning I have 3 infantry units together, hex to hex, and so I rarely ever see this happen in my games ....
If this is happening in woods .. not much you can do about it ... formed infantry vs. skirmishers in woods was always a problem. Just ask Braddock and Washington about it!

_________________

Generalfeldmarschall Wilhelm Prinz Peters von Dennewitz
3. Husaren-Regiment, Reserve-Kavallerie, Preußischen Armee-Korps
Honarary CO of Garde-Ulanen Regiment, Garde-Grenadier Kavallerie
NWC Founding Member
For Club Games: I prefer the Single Phase mode of play. I prefer to play with the following options
OFF:
MDF, VP4LC, NRO, MTD, CMR, PR, MIM, NDM, OMR (ver 4.07)