Had the same problem after riding 15 - 20 minutes. A new ignition module cured the problem for several months, but now it´s doing the same thing again. The XL185S engine is a six (6) volt system and is virtually the same as the Honda (ATC 185 ?) four-wheeler of the same model. Honda later upgraded the 185 cc engine to a 200cc engine with a 12 volt system.
Suggest writing to the Honda importer to take advantage of any possible ignition part or maintenance tricks and upgrades that may have been uncovered during frequent dealer efforts to try to put an end to this model-specific part defect. Who knows if it is available or practical, but it would be nice IF there were a simple upgrade to a glitch-free 12 volt system.