well i can say it has nothing to do with the thermo couple. if that fails the flame will go out
the ignition unit detects the flame is lit using the ignition spark electrode. as long as the burner jets are not blocked around this probe it should work
i have no experience with gas but it does seem odd that its ok till the flame failure device raises the flame. It could be the unit needs a service by a gas safe engineer to clean the jets and the burner. it does sound a bit like the flame is not burning correctly or the ignition unit has failed
either way it needs checking for safety
also make sure you have a working CO detector
Dave