no he wasn't. notice how he heard the ringing sound?? He's still inside the actual STEM. The game took place in a STEM-world created by Ruvik that's inside the real STEM being controlled by Kidman and the people she works for. If you don't believe me go watch the opening cut scene of the game. There was a ringing sound too, the only ones affected by it were Joseph, the driver and Sebastian. Kidman had no reaction at all.Actually I think the Seb was awoken from the STEM machine at the end. The scene with him on the steps of Beacon Mental Hospital looking at "Leslie" walking upright indicates that Ruvik successfully assimilated his consciousness into Leslie since as mentioned throughout the game, Leslie was the only one with a compatible mind. Ruvik was "killed" by the organization that Marcello (and possibly?) Kidman works for and wanted to get out into the real world. Remember before the final boss fight when Leslie walked up to Ruvik, got touched or sumthin' then became a puddle of water/goo? Thats when Ruvik got him I guess
As for Kidman telling Seb to be quiet, I think it was because she was tasked by the organization, (along with Marcello) to utilize the powers/technology Leslie/Ruvik had for your typical "secretly take over the world behind the scenes/Illuminati" shyt but once she got in she really wanted to kill Leslie to ensure that Ruvik would never have the opportunity to get out nor would there be some New World Order type shyt.
Just a theory
I wonder If Joseph is dead
an Inception within an Inception