Battery technology improvements will arrive. However, it takes time to productionise research prototypes.
During one of my holidays, I drove a self-charge BMW rental. It technically could still be sold after 2035. However, it had an electric range of less than 50 km before it switched to petrol. Car manufacturers will lobby for such loopholes to be allowed well beyond 2035.