If you've recently changed the spark plug, we can assume it's not covered in deposits and not the problem.
The first thing to check is the fuel tank breather vent. When the chainsaw is hot, remove the vent from the fuel tank and try to start it, if it fires up normally, you will need to repair or replace this vent.
Next thing would be to try adjusting the idle mixture ratio, turn the adjustment screw by 1/4 turn to make the mixture richer and see if that helps.
Another part to check would be the ignition coil, if this is on it's way out, it will cause problems when hot and will ned to be replaced.
Rupert
May 2020