I think that you need to check the electrical parts, like the ignition coil and the stator maybe when is hot they are losing continuity. I don't think that your top end is bad, if it 's bad will do the same when the shee is cold too, just my opinion I'm not a professional mechanic.