My1999 C40TLRX 2 stroke has 2 temperature switches on the head, one tells the CDI when the motor is warmed up and the other tells when the motor is overheated.
I have no idea what tells you CDI or ECU when the motor is warmed up so it can change the timing at idle or even if there is something like that on your motor,
but if it does have it and that device is not working properly, it might be changing the timing before the motor is warmed up properly to run while still cold.
Just some random thoughts from me.