How does the coal or oil get to the electric plant? Mining/drilling, trucks, etc. We burn the fuel in our gas cars, the electric car people burn the fuel at the electric plant.
That’s my point, you have transmission losses in either case, although people never consider the transmission energy loss in getting oil from the ground, refining it, and transporting it to your tank.