Problem isn't with sail switch.
Sail switch has to make up otherwise furnace will NOT even try to spark let alone fire off.
When it fires off a mili-volt signal is generated via the main flame. This signal gets sent back to circuit board by the spark electrode/high tension wire to 'prove' main flame is lit so circuit board will keep power on gas valve to hold it open.
Yours is sparking and lighting off but losing 'flame proofing' signal.
Dirty spark electrode
Spark electrode not being engulfed in main flame
Cracked ceramic causing signal to go to ground
Poor connection on high tension wire
Clean up electrode with some emery cloth
Check position of electrode
Wipe down high tension wire with a rag with silicone spray on it
Clean up connector on high tension wire at circuit board.