Flame sensor?
I had a gas furn that had the ‘would light then shut off problem’ it was a dirty flame sensor. The furn would light but the sensor would not recognize the flame so it would auto shut off
Replaced that piece. I don’t have the actual “light sensor”, just a high limit switch. open at 190, closed at 150.
I did too. My problem, it turns out, was that some ******* little bug crawled up the gas line going to the burner during the summer, and built a nest in there. A safety device in the gas valve realized there was a problem, and wouldn't let it stay lit.