Johnny Mnemonic says "yes!" but who listens to him?
Means the weapon's magical ability triggers on a hit- specifically, a confirmed crit on a nat20- not upon dealing damage. That the mundane properties of the underlying weapon would prove ineffectual against a particular foe does not mean the enchantment would likewise be nullified.SRD
Vorpal:...Upon a roll of natural 20 (followed by a successful roll to confirm the critical hit), the weapon severs the opponent’s head (if it has one) from its body.