I buy old broken down lawn equipment, clean it up and test the components (ie test compression, pressure test the carb, leak down test the cylinder, test all electrical the wiring for continuity and resistance with a multimeter which includes the coil and the spark plug, perform a visual inspection of the entire unit including disassembling the carb and cleaning the passages and screen with carb cleaner blowing air through the intake to check that metering diaphragm is still functioning and that the needle is seating properly using a inspection scope to magnify the seat for the needle valve to look for nicks or other bad spots that will cause a problem pulling the high and low screws and looking at their seats and the screws themselves then reassembling replacing any questionable parts with new ones. Once it's started I check the firing voltage duration, this is a good way to check the coil from a cold start to a warmed up engine. You can see if your coil is dropping off when it gets warm and the windings inside are starting to have an intermittent problem. A bad coil would cause exactly what you're describing. Coils going bad can have a good connection within when it's cold and the metal is contracted then when it's warm and the metals have all expanded the contacts will go bad and the space between the windings will get smaller. At this point any degraded insulation can start to cause problems. We all know how expansion and contracting works and how heat can effect something's size and the space between (look at cylinder sleeves that have to be cooled with liquid nitrogen to be placed and as they warm up are locked into place to the point they might as well be welded). The windings inside a coil are so close and so tight that what we normally think of as insulation can't be used and instead Shellac is used to insulated between the wires. That's the distinctive smell you get when a coil has been overheated or experienced a surge and gotten burnt. An aging coil will start to be effected by heat. It will start fine when it's cold but if it's warm it will become harder to start if it starts at all. Once it cools off and the windings and connections all contract to a certain point they start working properly and making a good connection again and it will may start. I can't remember the name of the piece of test equipment I use for this. I picked it up on Facebook marketplace for $50 when looking for a wireless TACH to set the RPM's to factory specs on the equipment I sell once it's been repaired. I happened to run across one that said it read the RPM's, firing voltage and duration and could be set to read high and low. So for $50 I couldn't argue with the extra ability to test the coil. It's actually an ignition diagnostic tool for cars but can be set to test 2 stroke engines as well. I got lucky with it as it cost much more than the $50 I paid. If I remember correctly it was several hundred. But it has been a lifesaver as I'm but swapping out parts on suspicion and can actually test the coils. I may have to swap it over to a different unit in order to have it operational and get a reading on it if the unit it's on doesn't start. But it's worth it in order to be able to tell for sure if it's the coil or another part.
Without the test equipment to know for sure I would hazard an experienced guess to say it's your coil. But my brothers chainsaw did the exact same thing and I had to rebuild the entire unit. He had ran a second hand Poulan Wild Thing up to 10 hours a day clearing land. I had bought it broken down, repaired it and sold it to him for $50. He had it for a year and he had noticed it was running hot. But rather than taking to to the shop he ran it for another 2 weeks with it getting progressively harder to restart after warming up. It had started running so hot he had to wear long sleeves and could barely stand to hold the saw. Yet he continued to use it. Finally my mom picked it up on a trip through Gainesville and brought it back to me in Pensacola to look at. He had run it so hot there where pin holes in the cylinder, you could put a light in it and it looked like a disco ball from the outside. There was aluminum transfer in the interior walls of the cylinder and the piston was melted around the top edges. The piston rings where welded to the piston. The rebuild was basically a new piston, cylinder and rings. Using as much of the other components as possible. The only reason it was even rebuilt was that I had the parts to do it. Technically it should have been tossed and he should have bought another. So as you can see it can be another problem. My brothers saw needed first not to be used to heavily, second a tune up to have the carb adjusted as that's what was causing it to run hot. But his neglect destroyed it. But the majority of the time I have run across a piece of equipment that will start cold then not want to start once it's warmed up it's been the coil going bad causing the problem. Next time it's warm pull the spark plug and move the unit to a dark place. Plug the spark plug into the boot and hold it against the engine to ground it or secure it with a zip tie and use a wire with alligator clamps one to the end of the plug where the spark jumps to ground and the other ends clipped to the cylinder of the engine. Try to start it. Look for the color of the spark. If it's a bright electric blue the coil is good. If it's an orange to yellow then it's bad. Or you can pull the coil and test it with a multimeter. Your looking to get the same resistance reading from the boot to the pick ups and from the kill wire connection to the pick ups. As long as those two readings are the same or extremely close to the same then you're good. If they are different by much at all then it needs replaced. But you gotta check while it's hot. It's will probably read fine cold.
Sorry it's so long. I wanted to be sure you understood it wasn't a sure thing, then show how it could be different. Then give you multiple ways to check since I don't know how your set up as far a tools go. I would guess you don't have a lot of test equipment or aren't familiar with their use since you are asking about it here. Not that that's a bad thing. A lot of us started out asking how to fix something on forums. There is a lot of great help here to be had absolutely free except for the cost of the tools you may need to pick up to use it. I still go to forums when I get stuck and have it pointing to multiple things that could be causing the issue.
Hope it helps