Bug? Not sure if that's the right way to describe it though...
Weapons only activate when a target is in range...once the weapon is activated, the weapon effects will last a pre-determined amount of time independent of whether the ship is still in range or not...most if not all weapons actually will still follow a ship leaving a gravity well, it's just that only beams are easily noticeable...