If a light uses active electronics, it will have an electronic switch, but the electronic switch is incidental. What matters is the active electronics, which put a negligible drain on the cell, which is usually less than the self-discharge of the cell.
The only light I can think of that has an electronic switch but a passive driver is the Ti version of the Lumintop Tool AAA. Because there is a capacitor in the switch, it has a small drain of 4mA, which is actually a lot as far as parasitic drain goes, and yet it still is not very much. So you could say the electronic switch is what matters, but it would only be true of that one Lumintop model. Zebralights use active electronics, but it isn't the electronic switch that causes the parasitic drain of less than 20uA; it's the driver's active electronics.
@Lester1965 No, parasitic drain does not shorten the shelf life of a battery unless you're actually storing a battery in a flashlight for years, and idky anyone would do that with a light with active electronics. If you're storing a light to be ready in an emergency, picking a light with active electronics is a poor choice.
But if that's what you meant and that is your concern, lights with active electronics most commonly have anodized threads for a lock-out function engaged by twisting the head or the tail
off a half twist, so store the light with its lockout engaged.
Not all lights with active electronics have a lock out function, however. For example the Lumintop FWxx series do not have anodized threads. In their case, do not store for more than a year with the cell installed.
And do not store any flashlight with an alkaline cell installed. When choosing a flashlight to store for years in case of an emergency, choose a simple flashlight with passive electronics, a mechanical switch, and one that can run on primary L91, L92 or CR23A lithium cells.