I'm trying too remember ...I had a car with passlock a long time ago. When it would lock out, the 'alarm' light would stay on while starting. Some light would stay on. Dig out your manual and read about the passlock. It should say. Is yours the passlock with the resistive pellet on the actual key shaft?
One thing that can cause the doors to spontaneously lock could be shorted wires in the door jamb between the door and body. After many thousands of open/close cycles the plastic wire jacket can crack and some wires can fray. I was trying to de-bug my Jetta a couple months ago and out of 22 wires in the door-to-body bundle EVERY one of the wires, the jacket was cracked, some in multiple places. And two of the wires were frayed and broken (probably touching other bare wires. That vehicle had all kinds of wonky things going on. You should be able to pry back the rubber door jamb boot. It's worth a look.
Read up closely in your manual how the passlock works and doesn't work. I don't recall exactly how the passlock works it's been quite a while ..I'd have to re-read the manual. But many vehicles the alarms behave in similar ways. Under certain conditions if the door is locked (again general terms) ...and alarm is engaged, and the battery goes dead, and you go to unlock the door with a key. The alarm system won't disable and will still be engaged, even once the door was opened. You can turn the engine over all day long and it won't start. The fix (on some vehicles) is to charge the battery, close the door, get out of the vehicle, then lock and unlock the vehicle with the fob. There are a few variations on this, but that's a general scenario. It should articulate it in your manual.