Is this 35-45 mins straight or total in a day? 45 minutes seems like more than enough time to prove that everything is working just fine. Does it ever recover? Does it start right back up or do you have to wait a bit?
You may have thought I was being a smart ass with my fuel comment but I really wasn't. If you still have adequate fuel level left, maybe check the fuel pickup for a split pickup or missing tube so it sips air earlier than expected.?.?.? Does switching to reserve help?
The only other thought that comes to mind is a weak or failing stator that is getting "heat soaked" the longer you ride. If it runs perfect and then just won't start for an hour or so, then starts and runs fine again for another 35-40 mins, check your stator. You can try and swap the CDI out and it may or may not help but 9 times out of 10, the new CDI is simply more or less sensitive and eventually the stator degrades further and it stops again. (always keep your old CDI for this reason!!!).
If the problem comes and goes intermittently with no rhyme or reason, check your start stop switch.