its a random chance that can be significantly increased by certain perks, or if ovulating. but not by any of the insect creatures.
dunno if anyone else has issues with it, but there are many times when it locks at the end of an animation until hit.
i found the same issue as Rusty, however i was able to bypass it by running it at administrator. that might be require