That right there is 99% of your issue. Want to actually fix it? Get an ecm from IDS (
www.idspd.com) that matches the exhaust you have on the bike. IF it actually *is* a Buell factory P&A race exhaust, then this is the part you need to order.
https://idspd.com/xcart/buell-xb12-04-07-pa-ecm.html
Install that, do a TPS reset (I highly recommend the CMI-Lite tool, which is also available from IDS) *CORRECTLY* and most likely your problems will be done and over with.
If it still doesn't run correctly after that, then odds are the O2 sensor could be a problem. It does happen on occasion, but not often. As pointed out above, it is NOT a difficult process to replace it.