My fireplace does the same thing but we have a t-couple. No electrics involved. I've replaced the thermocouple and it worked fine for about 4 months but now has started shutting off after about 5 minutes. I've even moved the thermocouple into the main flame so it's staying hot. I cleaned it and so far same prob.
There is a screw to the pilot line it's in tight. I was wondering what it did. Is it a flow regulator or something else? If I back it off there seems to be no change in the gas flow so I just left it in tight how I found it