Just watched an AI vs AI fight between a medusa and a hound. The hound would swing in, fire off some shots, and then back off again. As soon as it was out of the hound's range, the medusa would shut off its shields - apparently unaware of the fact that there were still several shots in transit that could (and did) connect with armor.
Tracking individual shots of ballistic weapons is likely to be too much effort - I'd try something along the lines of calculating a transit time for each such weapon, and just assume that it's still a threat for that long after it's moved out of range.