After reading over your original post a few times, it looks like your bike ran fine with the original (stock) ECM with the exception of some flat spots. Then you swapped in a Race ECM, did a TPS reset and that's when your current running issues started. I'd say you either performed your TPS reset incorrectly, your Race ECM has a problem (or a bad map in it), or it isn't the correct one for your bike model/year.
The factory manual specifies a TPS degree setting between 5.2 and 5.6 degrees after you've zeroed the TPS. There is no precise degree setting that you must set it at. It's just a temporary setting that should allow the motor to idle, nothing more. You're going to adjust it again after the bike is warmed up. If the bike is cold, it may idle a little high while the Cold Enrichment (like a choke on carbureted motors) richens the fuel mixture while the motor comes up to temp (160 deg C, 320 deg F), at which point you then set the final idle speed (1050-1150 rpm) as the last step of the TPS reset procedure. If the idle hangs a little high at stop lights, you may need to back off the idle a hair. Also note that the TPS calibration is unique to that ECM once set. You need to reset the TPS for any other ECM swapped onto your bike, but only once, since the ECMs will retain their TPS calibration for the TPS sensor on your bike, even if removed or re-installed. To your question about disconnecting/disabling the O2 sensor when resetting the AFV to 100 - No, it is not necessary or of any benefit. The 02 sensor is disconnected/disabled by some as part of the tuning process, and maybe where you read about it, but that's another discussion altogether.
If you're not experienced doing a TPS reset (not saying you aren't), it's easy to misunderstand the TPS procedure, although it's not difficult. The crucial step that is typically done incorrectly is the TPS/idle adjustment prior to reset. People often look at the TPS degree reading while backing of the adjustment and stop when it says "0", and hit reset. Instead, you need to slowly back off the adjustment until the degree value stops decreasing, regardless of what the degree value is. It may actually go past "0" to a negative value until the throttle plate is actually closed. Once the value stops decreasing, stop backing off the adjustment. Snap the throttle handgrip a few times to work out any tension or slack in the throttle cables and back the adjustment out an additional a full turn to ensure that the throttle plate is truly and surely closed. I always snap the throttle a few more times just to confirm that the degree value doesn't decrease any more. THEN hit reset, adjust TPS to 5.2-5.6 degrees for initial idle, warm up ride, and then final idle adjustment.
If there is nothing wrong with your stock ECM, other than some flat spots, you may be better off just using it and tuning it to optimize it for your intake/exhaust setup since you know your bike at least runs with it. Throwing on a race ECM isn't going to necessarily be any better since it's mapped for the factory race exhaust, not the exhaust you currently have on your bike. Even if it's new off the shelf, you're just as likely to have flat spots somewhere with the race ECM and would need to tune it anyways, just as you can with the stock ECM. If the race ECM isn't new, it could have a borked map or one that has a profile that would make your bike run like crap. Make sense? If the bike runs and you need to tune anyways, it doesn't matter whether you're using the stock or race ECM. The timing on the race ECM is slightly different, but not enough that I'd be concerned with at this time if I were you.
Sorry for the long-winded post. That was a lot longer than I meant it to be.