Often the problem is the timing chain tensioner which keeps the timing chain under a limited range of tensions. I am not familiar with your bike and you have not described what is happening to the bike, so, I am guessing that the chain is too loose and it shifts a cog or two and the ignition timing then is off. Caution, I am old and haven't worked on many newer bikes.
A description of what occurs would help greatly.