How so? Are you saying aircraft don't have the ability to lock the flight deck door from inside the cockpit, denying entry to anyone in the cabin?
I'm not going to go into the details of how the cockpit door works but these were your words
walks into flight deck, closes door and dead bolts
So clearly you have NFI how the door works.