When it cuts out, does the motor just die? Or is it just losing power for a split second? you said many contrary things and we can't tell what the issue is unless you give a better description. Kind of like saying, "It's broke, how do I fix it?" Details! Give us details.
As far as what rpm it loses it in, try to determine what throttle position it is, such as 1/2, 3/4 or WOT. That is more helpful. Put some masking tape on the throttle and the bars amd make marks at 1/8, 1/4, 1/2, 3/4 and WOT. Use that as a reference for the requested details. If it is just in a particular RPM, let us know that too.
If it's a gas issue the throttle position is the key, if it's electrical the RPM is key. So both details is gooderer.