On one hand, you would like the have protection against intruders. On the other hand, you don’t want to get stuck inside in a case you need to escape (for instance in case a fire breaks out.)
Build a mesh from steel of small “joints” that only allow movement of this joint in on direction. A window could have such a mesh installed, and since the flexibility is only in the out direction, intruders could not go in because, from the outside, it would be stiff as steel. You would also need to build sensors into these joints to monitor contact. When you trough yourself at this mesh from the inside, these sensors will register the contact, and if enough of them register that (meaning there is a significant mass leaning on the mesh from the inside), a release mechanism will activate and allow you to escape. You could also build into the wall a slow cable release that – in case you are in a high building – would slowly descend you to the ground inside this mesh, helping you escape.