I had problem with the passenger side mechanism few years back.
my 2001 car would turn the LED on the lock rocker switch on and off.
what i found was that the solder joints between the main connector and the green printed wiring board had bad solder. Reflowed the solder and the problem went away.
I believe the blue/red wire pair connects to the "door is open" switch within the door mechanism. and if this switch is (or the electrical connection) is stuck on the "door closed" state, the window will go up as soon as you let the door handle go.
I think Pelican Parts or another forum has additional detail to check this out.
google door lock mechanism.
good luck