Make sure all burners are lit for the short duration.
Pay special attention to the burner at the flame sensor.
Clean the flame sensor probe.
A dirty sensor probe can cause this issue.
It may not look dirty.
A few swipes with fine sandpaper should do it.