Have ridden a few of these in my time.
The problem is if you knock the fly wheel cover on a rock, it moves & causes the stator to rub on the fly wheel. This over heats the stator & damages the windings.
So you have a spark until it heats up, then loses the spark. Only cure is to replace the stator or have it repaired.
Hope this helps you.