This is true. Though the electric batteries do have the advantage of having already paid the "thermodynamics tax". Some of the energy in gas will go towards heat losses; energy that cannot be converted to movement.
It’s overall a net positive.
The odometer shock that will start hitting low wage earners forced to migrate to EV may have less important but similarly surprising unintended consequences.