June to August and December to February are the drier windows, when forest trails are kinder and savannah parks are easier to read.
Gorilla permits should be secured early regardless of month. Rain does not cancel trekking; it changes the mud and the photography.
We plan Uganda around permit dates first, then build the rest of the country around those forest mornings.