You have to change your clothes to that of a plague doctor so that they do not attack you.
I would suggest that it is a bug, because you're basically stuck in an endless loop. Your only option is to restart the game. Which I did, then equipped clothes before entering that area again. You shouldn't have to restart the game to clear it. Though, I haven't attempted to equip clothes during the fight.