@Paulinator there is no perfect way I know of to totally prevent it. But In my situation I grow under a green house and have a Large Fan blowing 24hrs/day
all over the plants and yet I still have found some mold in the stickiest strain today. 😒 When you have consecutive days of damp weather and high humidity
rot will sometimes set in quite quickly.
Things you can try like picking a variety that is mold resistant can help as can light manipulation where you basiccally force your plants to flower earlier than usual
by limiting the amount of light they get each day to under 12hrs this way you may get a harvest completed before the worst weather arrives?
Good luck Mate