check your wiring look for a hair of a wire that's not wrapped and grounding or a loose connection on all wiring look very close at this could even be a tiny bare spot in the wiring touching the frame and grounding out. Plug wire tight at both ends. O resistance on the plug wire check it with an ohm meter. and unhook the kill switch it might be grounding out due to vibs at higher rpm. Plug good and tight and is it clean and not gunked up?
Check your air cleaner it might be a little too oily and last is your throttle slide all the way open when you are wide open. Just some of the things that come to mind. Do each check one at a time, ride it to check if you found the problem. Step by step if you do 3 or 4 things at once you will not know which worked if you do get it to run right.
Is your permix the right mix? and not old. The float could be causing you fits too if your float is set too low. Got a fuel filter in place? fuel valve all the way on. the chicken poo filter in the tank might be gettin gummed up and starving it for fuel at high rpm. I know my fuel valve has a sweet spot that if its not right my engine will act like its cutting out at high rpm. I don't think your fuel cap is not venting cause all of mine leak fuel so its venting on mine you couldn't be that lucky to have a good sealing fuel cap could you? You see a little fuel leaking out if you fill it up that will let you know your tank is venting .
hope some of these ideas will help.