Truck is locking itself

Hi, I recently replaced the front differential seal on my 2004 gmc sierra 1500. When I got done I drove it around and everything checked out fine. The other day I went out to start it and realized my keys where left in the ignition and it was locked. After getting in, I started it up and it started fine and drove fine. The next day I went to start it and went back inside to grab a few thing and I cam back out and it was locked again. Thinking that I might of accidentally hit the lock, I didnt think anything of it. However the same thing happened to me the next day, and I mad sure this time that i did not hit the lock button. After talking to a buddy of mine he said to disconnect the battery for 20-30 mins and to try that, but that still didn’t work. I also checked the ground cable from the block for good connection and it still locks itself. I’m just looking for some sence of direction lol thanks.

I have an 03 trailblazer and that happened ocassionally, did a hide a key, Could be accidentally hitting the lock button, not sure but spare key hidden on vehicle. Maybe 6 moths ago since the last time. I was keeping it in my wallett, but thought hey I loose my wallet, here is where I live, and by the way here is a key for my car.

I’d suggest a shorted wire as it passes from the body into the door. The wire shorts and locks the truck when you shut it. May also be in the driver’s door lock switch itself. Slam the door and the lock button is activated.

Not sure, but the GMC may also have the option of auto-locking the doors on some models whenever the door is shut. Look that one up in the owners manual.

Alright. I’ll look into it… thank you guys for the reply, and direction! Its greatly appreciated!