You need to take the door panels off (or have them taken off) and lubricate the mechanism with something that will keep the water out. I'd think something like a lithium grease would be appropriate, but that's just a guess.
In that case wd 40 probably won't keep the water out. You need something thick and coating.
The real problem is that water is getting inside the door, but that's probably a much harder thing to solve. Try the grease.