I have noticed that when using certain weapons against enemies that the enemies seem to get stuck in a 'taking damage' animation while I'm firing at them. This is most noticeable with the chain gun against enemies like imps, where the imp will make a variety of 'taking damage' noises in addition to their animation.
This is to be expected, afterall I am shooting them in the face with a chain gun. However, I have noticed that on some of the bigger enemies that while ever I keep hitting them, they do not attack. They'll keep moving around and if I stop firing them will attack me immediately, but if I start shooting at them again they'll resume their 'taking damage' animation and sound loops and stop attacking again.
I have noticed that this doesn't happen with all guns, most notable the pistol (most enemies don't even do their 'taking damage' animation) and the BFG9000 (due to the massive firing ramp up time) but with weapons like the chain gun it seems to be possible to stop an enemy from attacking you for as long as you have ammunition.
Do some of the weapons in DOOM knockback or stun enemies?