Yeah it sounds like you might have an issue with a harness that connects the transmission to the ECM one of those wires is broke it's going to shift in its hydraulic mechanical mode, which is whenever it feels like it if it feels like it. All got to do with pressures and temperatures and unreliable. I like that better when the transmissions weren't connected to a computer.