It happens randomly, ships are set to engage in the gravity well, theyre not in a fleet so it isnt a cohesion issue. Ive seen it happen with Titans, Capital ships, frigates, and cruisers. Issuing a second attack order (clicking the original target again) will sometimes make them stop and fire as normal. This leads me to believe there's some sort of crossover between the attack order and move order commands. Heavy cruisers get close to attack, yes, but not almost touching their target. It's a little more than just a weapon range thing.