Is it possible this is happening (from my 04 owner's manual)?
Delayed Locking
When locking the doors with the power lock switch or the keyless entry transmitter and a door or the liftgate (if equipped) is open, the delayed locking feature will delay locking the doors until five seconds after the last door is closed. You will hear three chimes to signal that the delayed locking feature is in use. Pressing the power lock switch or the lock button on the keyless entry transmitter twice will override the delayed locking feature and immediately lock all the doors.
You can turn the delayed locking feature off or back on again by doing the following:
1. Press and hold the power door lock switch in the lock position.
2. Press unlock twice on the remote keyless entry transmitter.
This feature will not operate if the key is in the ignition. You can also program this feature using the DIC.
See “Delayed Locking” under DIC Operation and
Displays on page 3-56.