If this was a Triumph Speed Triple it would be a classic case of the ignition pick up coil failing.
https://motorandwheels.com/problems-...-speed-triple/
Since it's not a Triumph it may be a red herring. There's usually a spec for the coil resistance (check it cold and then stick it boiling water and recheck - if possible) and for gap, assuming (yet again) it's like a Triumph. Is the coil getting hot?