I was there in early June two years ago and experienced the "frequent heavy showers" at that time of year (described as early monsoon season)but there was also plenty of sun, I do remember swimming in the rain on a number of times.
I am not sure if you can avoid the rain as it is pretty much monsoon season throughtout SE Asia at that time.