i have a 95 jeep grand cherokee and my door locks lock and unlock by themselves while driving and when there locked and you unlock the door you cant unlock or lock them no matter how many times you hit the button?
a guy at work was just telling me his 99XJ does that. He's figured out that it does it on rough roads, or I should say uneven roads (he rarely leaves pavement). Once the suspension starts going, all 4 locks go spastic. I told him I never heard of that and had no ideas. This post doesnt really help you, but you're not alone
Given that said, I'd tempt myself to say its the switch. Contacts get loose inside, randomly jumped it to lock and not allowing the switch to switch? sounds plausible.
it works good once you crank the jeep up you can lock and unlock fine just when its not cranked you cant lock or unlock using switch. and when its running sometimes it locks and unlocks by its self like the auto lock is messing up i checked the fuses and junk