Interestingly enough there is a study of Ramadan fasting’s effects on gout. https://pubmed.ncbi.nlm.nih.gov/25275760/ Long story short, fasting for just a day or two has no measurable effect
However, like you said, long term fasting can raise uric acid levels in the blood, which can lead to gout attacks. Especially if you get dehydrated.
This is Dr. Scott Watier talking about fasting and gout if you want a more in depth answer and fasting solution.