Yeah, the scripting in that room is kinda messed up, it doesn't refresh on reset/death if you pass the trigger. I got some rooms I gotta fix up and rebalance once the voting period is over, but in the meantime, you can still pass this part!
See, the 2 tile vertical line of carpet is the trigger for the guy. Stand up here, and dash left, and you'll chase away the guy without getting shot. Then, you can safely travel on the carper in this hallway, under the turret's range. If you're not using am emulator with savestates, I recommend using the save point in the orange stairway, because then, you can continue from there.