Water heater flush leaving pilot on is it safe?
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.