Bear in mind that the force of the flywheel nut against the flywheel on the tapered crankshaft is where the strength of the entire attachment is derived. The key is primarily for timing alignment and only a marginal safety feature for the crankshaft in the event it somehow experiences excessive rotational torque. It has nothing to do with how tight the flywheel is. That said, and if the flywheel and crank keyways aren't hogged out, you can obviously just replace the key and probably be fine. In the meantime you could also carefully scribe a line on both the end of the crankshaft and face of the flywheel which correspond to the center of the keyways. Line them up and reinstall the flywheel to see if it still runs close to normal again.
I know this post is a couple of months old but I’ll share a recent experience anyway. My 064 Stihl was running rough and spitting back through the carb. Went through the usual things, checked the piston, good, rebuilt the carb, replaced fuel lines and filter, checked the spark screen, checked coil gap, all good, still spit through the carb and ran rough! After some thought and reading, I pulled the flywheel, lol and behold, the flywheel had slipped, deforming the key! I didn’t have a spare at the time , but I remember reading about using toothpaste as a kind of loctite on the shaft. After carefully marking the slot on the flywheel with a sharpie then tapping out the damaged key, I re installed the flywheel with a dab of toothpaste around the shaft, I lined up the mark with the slot as best I could. I gave the flywheel a solid tap using a socket to fit over the shaft, then let it dry for a few hrs, success! I just used the saw to mill up a ponderosa on my property, 2 solid days work, guess I’ll have to spring for a new key.