So firstly, the tailgate key hole.only raises the window if it is down to save you opening the car again to shut it.
If the window drops when you open the door handle then the CCU is getting a command to operate the tailgate latch.
Most likely it is the motor in the tailgate latch that has...