From memory of what has been published here previously Scag use a delay on the seat switch so when you drive over rough ground the engine is not continually turning off & on.
I don't service any Scags so I try to stay clear of Scag posts.
Try bypassing the seat switch.
Also put a red spark tester on one of the plug leads.\If the flashes stop before the engine then something is closing the engine down & that is most likely to be the module
I have no idea how to test one or if it can be tested with home mechanics tools.