I have a 5 year old 50 gallon Bradford White gas hot water heater which will not stay lit.

The pilot will light when the unit has cooled down and will stay lit. The burner lights fine when the thermostat is adjusted. However once the tank has reached temperature the pilot goes out and will not relight until the tank has cooled. I replaced the thermocouple and it did not help. Also the vents and air circulation are all clear of debris.

Any ideas. Replace the gas control box? Replace entire burner assembly?