Yeah but you may need much more KwH to provide heating than electric, thats the bit people are ignoring.
I did some sums last week, for my boiler e.g. and discovered in my circumstance a 2000 watt portable heater is cheaper than using my boiler to heat my room.
Once move on to heat pumps it becomes clearly in favour.
For gas to break even in my circumstance it needs to be no more than about 23% of the cost of electric, currently its about 34%.
Once all the unlinking of energy costs kick in, more renewables come online etc, the gap will close even more on unit costs. There is a reason gas boilers are been phased out.