if you take the staple ("keep") of your mortice lock out of the frame, which you should do when painting the frame, then the lock will no longer hold the door tightly against the jamb, so you can put a few matchsticks at the very top and the bottom of the door, to prevent it touching elsewhere. This will prevent it sticking, and allow air to circulate, encouraging drying.
Yes, when you put the staple back, run a smear of Vaseline down the touching surfaces, it really will prevent sticking. Just a slight smear off your finger, not great greasy gobbetts.