weight gain during year 3 is very common - with or without PCOS. Some people have had luck with Weight Watchers, intermittent fasting, or Keto. Some just go back to what they were doing in year 1 - not all the way back to protein shakes and purees, but the whole protein first, then non-starchy vegetables, and maybe an occasional serving of fruit or whole-grain carb. If you do the latter, start tracking (if you're not doing it anymore) to see where you're averaging calorie-wise, and then start cutting back from that. I find that easier to do if I cut 100 calories at a time rather some drastic cut.
different methods work for different people - so just find one that works for you. You CAN lose regain - although it's much slower and harder than it was when you were in weight loss mode.