Does the problem occur when you're plugged into any A/C source, or only at the one you're plugged into now? Have you recently installed LED lighting? They've been known to flicker under various conditions.
When you switch between shore-power and generator-power, the Automatic Transfer Switch (ATS) is the device that does the actual switching. After A/C power from either source gets through the ATS, it branches off, with one leg going to the converter. The converter supplies D/C power to the lights, but since the lights aren't flickering while on generator-power, the converter seems to be working.
If you haven't switched to LEDs, and you're experiencing this problem when plugged into any A/C source, I would suspect a dirty/bad contact in the ATS itself, or a faulty shore-power cord. It's not unusual at all for the wires in the plug head to fray, make poor electrical contact and ultimately break.
Kev
(By the way, welcome to the RVForum!)