I have to do a water heater flush. From what I read, most websites said to leave water heater on pilot also leaving the gas on. Is this even safe? would the water heater kick on when draining if left on pilot? will the tank be damaged if there is no water in the tank if left on pilot?
Yes it is safe to leave the water heater in pilot mode while flushing. You do not want the burner to fire while the tank is empty as this can damage the tank but the pilot will not cause a problem. Added: most gas valves with a standing pilot have the temp setting and “pilot” then off settings. Rotating to the pilot mode will keep the burner from turning while flushing. Some valves have a button to push to go into pilot mode. For gas models with igniters just turning the valve off is fine as it will relight automatically.
I agree with the others and will go a whole lot further to how a flush is actually done right...not the silly YouTube and Internet majority way. Don't do much of anything that you plan for just a flush.
If you aren't moving the tank nor replacing the T&P valve nor Anode Rod. Then, just open the drain valve, once your hose is attached.
A Drained-Flush does very little to remove much of anything and you should use the water pressure to your benefit to shoot, blast and drag sediment out.
You can then also shut the cold water inlet valve while the drain is open to cycle that opened & closed. To stir-up any remaining debris and re-pressure behind big chunks, to blow them into the drain valve where you can crush them by opening and closing the drain valve on them.