It may losing spark under load after heating up. Remove one at a time the spark plug wires while it is acting up. Replace the plug wire after testing and do the other cylinder. IF the engine when one wire is remove then the other cylinder is dead.
I just did a Kawasaki engine where it would not act up for 30 mins then it starting surging and cutting out. Ended up replacing one defective coil and while I at it replaced the older of the two coils too.