Most underground gas lines leak, not some, most.
So not 100% efficient even if you just look at transfer. There’s pumping and pressurizing stations because of the friction losses dropping pressure through the piping network, and all of the leaks also drop pressure along the way (very very common, most leaks are ignored as they don’t pose a danger, but unburnt hydrocarbons are a major pollutant) hence the need to repress Irish the lines. And those places release LOTS of unburied hydrocarbons when they purge (we’re having major problems in MA with a pumping station).
Resistive heat is 100% efficient at converting electric energy into BTU’s to heat the room, heat pumps can be over 250% efficient (more BTU’s out than energy in), the best mod/con gas systems are 90% or so in actual application, and still require electricity on top of that to operate, and usually do purge unburnt hydrocarbons during their ‘pre-purge’ before ignition.
And no, electrical transmission isn’t a 20% loss. 5% on a 25KVA transmission line is pretty accurate.
Full Disclosure: I have oil heat, and hot water, which is only 85% efficient. So I’m not beating the drum because I have electric heat, but facts are facts.