You need three things for a saw to run properly, good spark, correct air/fuel mix and compression.
My first stop would be a new plug- possible the plug is loosing spark delivery when warmed up and returns to normal when cooled. If not the plug, then it gets more expensive and the coil is on the way out- they can perform in this way when breaking up internally- all connections present and correct when the coil is cold, missing when hot.
Check all wiring and kill switch for continuity, could be a faulty kill switch- but I would be thinking seriously about the coil and the only real check is a coil swap for a known good one.
Is it a Mk1 or 2? Is it autotune? If it is not spark related, it could be air leak related- seals sealing when cold, but leaking when the saw heats up, autotune doing enough to compensate until shutdown and then will not restart.
With not much information to go on, that would be where I was looking. Requires a strip down, clean and testing, both electrical and pressure/vac.
If it is autotune- your dealer is your best bet at diagnosis.