DE-ANNE, It is possible that your problem can be rectified by a reputable CORGI engineer, without replacing any parts.
If the pilot tip / supply pipe is partially blocked this will explain your problem. i.e. there will be enough gas at the pilot to keep the thermo-couple heated, in doing so, allowing the gas valve to remain open. But when the main gas burner ignites, this ' robs ' the pilot of its pressure, the thermo couple will then sense that there is insufficient heat to keep it open, and shuts down the gas valve.
Ensure that whoever does work on your boiler is CORGI registered.
Hope this helps.