No no what happens is that my alarm system auto locks the door when you turn on the ignition, and auto unlocks when you turn it off. Kinda like how some modern cars auto locks the door once you get into Drive or go a certain speed. Anyway I turned on the car with the door opened, then went out to check the hood, closed the door without thinking, and when I went to go back into the car, stupid door was locked!!!
I know that all modern cars with power door locks yes won't let you lock the door if the key is in the ignition. There was one time when I wanted to charge my phone in my Mazda 5 while I was in a restaurant... I put my key in the ignition with the accessories on, then I manually locked each and every single door except the one back door, exited out the back. Now all the doors was locked. I covered up the front display so the car wouldn't look like it was on. Not recommended all the time due to theft concerns but I needed to charge my phone.