You need a synchronous generator governor rpm to be stable enough, so its frequency wobble is not too great for inverter to track the freq/phase wobble. Generator should sound smooth and even with no 'wha-wha' sound pitch variations. A DVM frequency readout is not fast enough to show generator frequency wobble.
I have never seen generator sinewave distortion bad enough to cause a LF inverter to disconnect. What generator distortion does is create inverter loading current variations. Theoretically if distortion is really bad, the current peaks during AC cycle can get high enough to cause inverter to release from generator.
Other mistake is having AC input charging level set too high for generator power output capability. Inverter will lock on generator, close pass-through relay, then jump heavy on generator for battery charging causing generator to bog down, causing inverter to immediately release from generator. On Victron, easiest way to avoid this is to set AC input maximum current limit suitable to generator VA rating. It will override any AC charging settings and back down charging rate to stay within AC input current limit.