Well we know that there are electrical fields that act as security perimeters, and when listening to the overhead PA system you can hear an announcement of "B1 security alert. Standby for ID check." So there is some form of internal security network. I would suspect Leon got out before any alarm was raised. Perhaps using his knowledge of the waste disposal network to aid in his escape.

Also in one of the deleted scenes when Roy and JF go to visit Tyrell I think there was some sort of automated checkpoint that would probably drop you off at a guard post if you didn't present the correct identification. Or, possibly just fry you right there._________________full tilt boogie baby

If no one heard the shots, he might have just simply walked out of the VK room, got dressed, and headed out like it was any other "word day". Remember, he was presumably disguised as an employee of the Tyrell Corp. in the Level 9 replication center. Or, the more likely scenario is that he simply blended in with hysteria that ensued after the shots rang out and quickly left the building. There's any # of scenarios but I think it's important to remember that he was disguised as an employee at the time and could have easily left the pyramid as long as he wasn't seen by others pulling the trigger.