The window to the Basement is similar to a display window. Dalinar entered in the guest mansion while the group was entering it. Arya and Adolin are locked by Astrid inside the room in the Basement. Shallan broke down the window and entered in the Basement by staying in the window, being in the window is the same as being in the Basement since the window constitutes a part of the basement, however, by not crossing past that display part, he never entered in the room in the Basement. Shallan kills Arya and Adolin, unlocks the window and leaves the Basement, the window has an auto-lock, so it locks itself. Astrid unlocks the door with Shallan by her side, at that time, Dalinar is spotted by them either coming down to the Basement, or being just outside the window, while Arya and Adolin were the only ones in the room in the Basement. Shallan or Astrid kill Dalinar while he was either inside the Basement or outside the guest mansion. Astrid kills Shallan and commits suicide.
Yes, this is the same theory, regarding The culprit of the basement cannot unlock the entrances, I present this:
This blue doesn’t necessarily mean that the culprit of the basement never unlocked an entrance, this red can be interpreted simply as the culprit of the basement not having the master key, thus being unable to unlock the general entrances throughout the guest mansion, however, once inside the Basement, it is anyone should be able to unlock the window. Another thing to be noticed is that when the window was unlocked, it wasn’t used as an entrance, because the purpose of entrances is to allow someone to enter a room, while it was used to leave a room, so the window wasn’t an entrance, it became an exit.