(+) some folks on a German forum reserve engineered the can bus protocol for the Bosch motor and it exposes torque https://www.pedelecforum.de/forum/index.php?threads/bosch-ac...
Additionally, with middle motors (which most ebikes today have), you‘d need to have the chain run continuously to transfer the power from the wheel back to the motor, and you likely could not do that with a derailleur shifting setup.
That said, I‘ve seen (but not tested) one model that had regenerative braking, so that does (or at least used to) exist.
I'm not sure that cars even begin regenerative braking until you actually hit the brakes as opposed to just letting off the accelerator.
And they're probably better off just adding a generator in-line with the pedals (in fact, I'm surprised these things have "direct drive" at all and aren't just a generator on the pedals with a wire to a motor on the front/rear hub).