I bet lunch money that you could remove the thermostat and the bike would run the same. I've been running without one and we're expected to hit 104F today. I've been running several days like this and at least one was over 100F.
If I didn't remove the thermostat myself, I wouldn't know it's not in there working perfectly.
I'm not saying it won't matter, but I really can't see it causing the problem that you describe. Maybe if you were in a very cold area it would be different.
One thing that was interesting, and you should look closer, is that it worked great then it didn't. The other is the smell of gas. I have that now too after I removed the tank. She was actually leaking all over from that rear tube on the left under the tank. The one that's low pressure, seems it didn't seal properly and I "fixed" it, but I still smell the gas.
One other thing, you can have more than one problem. The stuck open tstat was one, the gas smell another... that doesn't mean they are related to the power loss issue.
Finally, did you check for proper ground? When I hear of these issues, I think something electrical. Given that you replaced most everything concerning fuel (except you didn't list fuel filter), I'd start looking at the ground connections (including that one under the tank, I broke that one removing the tank). The power to the computer, etc...
I had a battery cable that looked perfect but was rotted inside. You couldn't SEE it, and it still worked sometimes, but you could FEEL it, it was rotted inside and it was so bad you could feel it. That can happen to any wire.
I'm not sure how to test how much amperage a wire can pass, I think there's a safe way, I just don't know what it is.