To combat against that risk of hitting the canopy, most modern fighter aircraft do a couple of neat things.<p>First, there is a linear shape charge embedded in the canopy. This is detonated at the moment ejection is initiated. This charge completely shatters the material. So instead of having a whole canopy flying about, the canopy is retained and the pilot ejects through this shattered material. The charge is supposed to shatter this such that the pieces are very small.<p>Ejection seats also have a couple of small posts at the top. The purpose of these is to assist in punching through the shattered cockpit.<p>Ejection is still the last resort, and your friend accurately relates the risks. But work is being done to make the process a little less risky.