Rav4 keyless entry

My Toyota Rav4 doors lock automatically about 5 seconds after I start the engine, unless I open the door within that 5 second timeframe. Recently, I started the engine and opened the door at the EXACT time that the door locked. I let the door close and my car and all its contents we’re locked. Now, when I use the keyless entry, all the doors lock. But then, almost always, the drivers door unlocks itself a few seconds later. I can lock it with the key, but not with the remote.