Lubricate all the working parts in the latch also. My drivers door did this, it was because the latch was hanging up. The solenoid couldn't push the part of the latch that unlocks the door opened so it would just relock itself. I greased it up good with some spray silicon and worked all the parts and it's been good since.