there should be a rod that sits in the pilot flame. that rod is a thermoelectric pile. when it gets hot it is a electric source. the output of the thermoelectric pile keeps the gas valve open. So.
1) make sure the thermopile is in the flame.
2) make sure the pilot is burning well. these have a small orifice so any dust, dirt, spider webs, rust can result in a low flame pilot.
3) those thermopiles do fail, not often but the do. usually the failure mode is reduced voltage output which will result in the pilot extenquising. if it fails with no output, you can't keep the pilot buring w/o holding in the pilot switch.
2011 Keystone Outback 295RE
2004 14' bikehauler with full living quarters
2015.5 Denali 4x4 CC/SB Duramax/Allison
2004.5 Silverado 4x4 CC/SB Duramax/Allison passed on to our Son!