By design, grid-tied inverters are rather fussy about the frequency of the power line and will shut down unless there is power at the right voltage very close to 60 cycles (50 in some parts of the world) and stable for several minutes. So, if the sun is shining and the power fails, the solar inverter will shut down immediately.
There is a minimal risk in some specific scenarios. Depending on a number of factors, the solar panels may or may not try to augment the generator during a daytime power outage. A 20KW generator probably uses a whole-house transfer switch. If the solar panels are tied to the load center behind the transfer switch as opposed to a separate panel or meter on the utility side of the switch, and the generator's frequency is close enough to 60 Hertz, the solar inverter may see the generator as if it is the utility and activate. This would result in the solar panels producing power in phase with the generator and the load. It's possible that this could cause issues if the panels produce more energy than the load is consuming, in which case the solar output could possibly try to turn the generator as a motor and cause it to speed up, then go out of tolerance for the inverter which will disconnect, then repeat every few minutes.
There's an unused microswitch in the transfer switch that could be wired as a dry contact to the solar inverter to inhibit it during a power outage if this is an issue. Alternatavely a service-rated panel could be used to connect the solar system to the utility side of the transfer switch.