The power to run the generator comes from somewhere. Gas powered cars that charge their own batteries use up more gas just to run the alternator (the charger). And that's with the understanding that the car isn't powered by the battery.
Expecting an EV to charge its own battery is like expecting a gas powered car to refine its own gas. It takes power to do that.
Hybrid vehicles do that a little. When you apply the brakes, the brakes charge the battery. Basically the momentum you're losing by slowing down is energy that's being "rerouted" into charging the battery. But that's re-using a little bit of energy from a process that doesn't happen often (braking). There's only so much you can get from that.
By the way. I'm not a green energy hater. I have lots of solar on my house because I like green energy from a decentralized stand point (if it works in your situation, you do it, but not force everybody to because it's usually a bad idea).
I know what you intended to mean. But EV cars also use the brakes to recharge their batteries. They also use momentum/inertia to recharge. Of course that's recapturing some of the energy expended to move the vehicle in the first place. We have an EV, and our latest service check after two years (at the extremely low price of $35 total) showed almost no brake wear because of stopping the vehicle by using the momentum to recharge the batteries.
No heat engine is 100% efficient.