Having read this and other posts on the same topic, I see four things that keep doors from locking automatically.
If the rear hatch is not fully closed, they will not lock.
The key fob is out of range when the last door is shut (passengers getting out after the driver).
Other electronic...