Hi, and sorry for the late response. So I just retracted your steps (if I'm understanding everything right): entered stealth, trespassed, got recorded by the camera outside the sec room but wasn't seen by anyone else, then talked to Delma (hadn't talked to Everard), got permission to enter sec room, erased footage, and walked out - and no one was shooting at me. The two flags you mentioned are both set to false, and the code does check their values.
If that order of events is correct, then it's probably something very specific that we're missing here. If you're still around, it'd appreciate it if you could send me your save after this happened but before you left Foundry (if you still have it). You'll find saves in C:\Users\[You]\Documents\My Games\Underrail\Saves. Copy the folder named like your save, upload it to Google Drive, Dropbox or similar, and post the link here.