Welcome to the forum Foldout, and THANK you for the clear description of the bike, the problems and what you've done. It helps so much and my crystal ball is all worn out
Let's cheat a little first before we start a proper diagnosis and hopefully we get lucky.
Things to note under Problems:
#5 that is a sign it is running lean, and
#6 also a sign it is running lean or weak fuel pump.
And things you've done:
#6 Believe it or not that unseated gasket will do all sort of weird things including stalling so go ride it.
#7 Thats impossible, the bike would not run without the CPS working. Possibly you mean the error code was disabled?
Things to check.
One TPS re-set should be fine, it won't become 'un-set' unless you mess with the idle screw again like you had to to set it correctly. You DID do the proper procedure.... Not just press the re-set button right??
Check your AFV and post it here. That will be a clear sign of what the ECM is trying to do and lead us in the right direction for diagnosis.
Good luck!