Electric cars convert nearly 100% of the electricity stored in the battery to work used to move the vehicle.
The story with the internal combustion engine (ICE) is quite different.
The efficiency of the internal combustion engines has increased since its first successful commercial introduction in 1859. This first commercial engine achieved 4% efficiency and the next competitive rival achieved 14% efficiency. Both of these engines were not used in vehicles.
Modern-day ICEs are 20% to 35% efficient. The remaining energy is lost as heat. Half of that heat is lost through exhaust gases and the other half through the cooling system of the car.
The most efficient ICE is a combined cycle gas turbine that can achieve 61% efficiency. This efficiency, however, can only be achieved in a static setting such as when used to generator electricity in a power plant. This is why the argument that better use of gasoline would be as fuel for gasoline electrical power plants to produce electricity for electric cars.