first the water leak issues and then the tailgate solenoid locking problems.
I have marked in below pic where the membrane especially must be well sealed.
Curved surface tends to raise and leaves a passage for water into the car.

And this pic shows new mastic I used
