Diesels are already more efficient than EVs in most of the world (where electricity is predominantly generated from fossil fuels). Diesel cars can already hit 40% efficiency, trucks 50%, and ships 60% efficiency. Electricity generated from fossil fuels is about 40% efficient (coal) to 60% (gas). Call it 50%. Power lines have about 5% transmission loss, battery charging losses are about 15%, battery discharging losses about 15%, and electric motor efficiency about 90%. For an overall EV efficiency of (50%)*(95%)*(85%)*(85%)*(90%) = 31%.
That's actually pretty close to the efficiency of the gas engines used in cars. Years ago I backed out the efficiency of a Nissan Versa using the Nissan Leaf as an energy consumption equivalent (since they share the same chassis and thus aerodynamics), and it came out right around 30%. Those new 6-speed, 8-speed, 10-speed transmissions and CVTs help a lot. It's why I've been saying for over a decade now that the priority needs to be converting our power generation to renewables and nuclear, and shutting down fossil fuel power plants. If you don't do that first, switching from a gas vehicle to an EV may make you feel better, but doesn't really reduce carbon emissions. (The energy cost advantage of an EV isn't because of efficiency; it's because coal and natural gas are an order of magnitude cheaper per Joule than gasoline and diesel. MPGe does not take generation, transmission, nor charging efficiency into account. It can't because those will all be different depending on your local power plant's efficiency, your distance from the power plant, and type of charger you use. So you can't really compare MPGe to MPG.)