I’d be tempted to clean the exhaust. Probably won’t sort it but narrows the field down and it’s never a bad idea to have a clear exhaust.
I’m with Rob on never underestimating the capacity of bikes to mislead. If you’ve got them to hand try a “new” carb, coil, exhaust etc.
It could be an issue with the ignition module, even just a bad earth.