Weird. Looking at the possible causes I'm not sure what would cause the engine to cut out due to temperature change. I would start looking at all the engine kill switches (handlebar, sidestand, and neutral sensor since you changed it). Maybe there is a loose connection somewhere that isn't bad enough to stop the bike running when it's cold, but gets worse as it heats up. That's really just a shot in the dark.