You do realize this is a dead 2 year old thread?
He might not have, but I do (now nearly 6 years old). Apologies for reviving this long dead one as my first post, but I'm currently experiencing a nearly identical problem. Sad that the OP never returned to update.
I'm going to assume since the last action he mentioned was replacing the TCM (well actually getting the replacement programmed so it could be used) that this resolved his problem before he disappeared never to be heard from again.
I just ordered a pre-programmed replacement TCM for mine, will update here if it resolves the issue. If not I'll create a new thread.
For reference, the symptoms I'm seeing are that while the gear selector is not in park - usually while driving in a forward direction but not always - the PRNDL indicator in the IPC will jump to P and then back to the selected gear, and the door lock(s) will cycle. Sometimes this will be coincident with hitting a bump, and sometimes it will be at completely random times. Two days ago I drove a short distance early in the morning to take my wife to the donut shop. I let it idle while parked, and while sitting idling a MIL was set. After this the ECM / TCM went into limp mode. U0101 and P0601 DTCs were set. Testing power and grounds to the TCM connector showed no issues, and since I had one on a dead soldier 4l60e in my storage unit, changing the range switch for a known good one also had no effect. After some testing and prodding I also noticed a P0700 (non-specific TCM malfunction) was set on occaison, and it would even get so bad the PRNDL indicator in the IPC would be stuck at R regardless of what gear the shifter was in.
Edit: Based on the DTCs, I'm working from the assumption that the TCM is either losing power or some other combination of unexpected input state(s) are causing it to reboot since proper operation usually resumes if a DTC isn't set after the incident.
I drove it 115 miles round-trip to work yesterday and only noticed two incidents shortly after start-up and at speeds < 50mph. Seems like after the vehicle is up to temperature the problem subsides.
I feel like this problem may be temperature dependent, which is sometimes indicative of a cracked / cold solder joint in the offending module.
Anyway, as I mentioned I'll update this post if the replacement TCM seems to solve the problem. This is a new acquisition and I've been working on it extensively over the past month to get all the gremlins solved after years of deferred maintenance from previous owners. But we've had an Atlas powered Trailblazer EXT for almost a decade, and I've had the joy of building a new transmission for it - twice. But never an issue like this (since the I6 GMTs have no separate TCM).