This bug was present in version 1.11.1. I can't easily check if it's still broken. Here's the thing:
I activated auto-turret and lured bandit leader and his 2 bodyguards from their room. They stand in turret's attack range. I moved away so i don't get shot by the turret. And now turret is not attacking anyone, even if bandits are in it's attack range.