Lanyard on all lights.
This one is my EDC that I deploy with an ice pick grip using the Harries technique (750 lumens/19,000 candela);
This one is used with a syringe grip/Rogers-SureFire technique, which allows most of a standard two-hand hold of the pistol (650 lumens, 70,000 candela);
Both are equipped with twisty tailcaps for momentary-only operation, which IMO is mandatory for a defensive use light. The O-ring prevents unintended tightening of the tailcap, but with a hard two-hand twist constant-on is still available if needed.
Being able to simply let go of the light and have it turn off immediately (and without fail) is a huge advantage: fast, foolproof and instantly frees both hands while fully retaining the light. To re-engage I bring the support hand to my chest where I trap the light and re-establish grip.
The lanyards are attached to the light with a thin split ring which allows the lanyard to break free if needed.
If you have manly-sized hands you can learn to retain the light in your hand while doing mag changes, malfunction clearings, etc. but it takes practice. Under stress there's no guarantee the light is NOT going to be dropped. Add wet hands, gloves, etc. and it becomes even more fumble-prone.
I remain a staunch advocate of setting up a handheld light specifically for defensive use with a pistol. Single output, momentary-only operation, robust construction and a lanyard are the key features.
EDC Light Builder | No Nonsense Everyday Carry Flashlights | EDC Light Builder P-F Sub-forum