It is not a problem of delay, as when the bug occurs, the attack animation runs in loops. I sometimes let it run up to 5 times before just leaving it for a few seconds so that the animation ends, and re-attack.
EDIT: Another bug that I just had now is that the gargoyle would instant attack whenever I would pick it up.