Welcome to the forum
Your water heater has 2 modes of operation. On Electric it will use 120VAC to heat an element in the tank. On LP mode it uses a flame to heat the water.
If your turning the electric side on while running the gen, your putting a load on it and the gen will bog down for a bit and should recover depending on size of gen and what else is on.
If you turn on the LP side it only needs 12VDC to ignite the gas. Most will use the gas function to save the available power for things like the air conditioner and microwave.
__________________
2012 Copper Canyon 273FWRET being towed by a 1994 Ford F350 CC,LB,Dually diesel.
Airlift 5000 bags, Prodigy brake control, 5 gauges on the pillar.Used to tow a '97 Jayco 323RKS.
Now an RVIA registered tech. Retired from Law enforcement in 2008 after 25+ yrs.