Recently, whenever I lock my Golf Mk 4 and leave the car for some time, when I return to the car all 4 electric windows have dropped open by about a third of their travel.
I would get some lube spray into the drivers door lock/catch. If you pull the door handle to the open position you can get some spray in there also. This might help or change the symptoms slightly to know your in the right area!
Mk4 Golfs do have a reasonably complex door lock/catch mech. They can can stripped out and inspected for soldered joint problems. If not its a replacement assembly. Think there upwards of £100.
Might be worth checking the wiring in the door shut area. Inspect the wiring in the black boot between the door hinges. Might be broken from opening/closing door?
On my mk4 golf if you put the key in the door and hold it in the locked/unlocked position it raises/lowers the windows. I think its getting a false signal from somewhere?