Let me add to the confusion.
Regen is silver but coasting is gold.
Let’s be clear that this is not relevant in practice but makes a noticeable difference when „hypermiling“: Friction brakes (pads on disks) are worst because they dissipate the entire movement energy into heat which is then gone forever. Regen is much better because it can recoup at least part of the energy that was used for acceleration during deceleration, as explained by fellow forum members above.
Coasting means freewheeling with the minimal possible resistance, not adding energy to the system, nor taking away more than is unavoidable (mostly air drag and rolling resistance in tires and bearings). Coasting makes the best use of the energy that was already converted from chemical (battery storage) to electrical (motor) to movement. Regeneration goes the opposite way and converts from movement to electricity to chemical energy. Every energy conversation has „losses“ (heat dissipation), which may be small but always greater than zero (fundamental physical law). Therefore, even with regen you’re necessarily gonna lose some.
If you want to optimize mileage, prefer coasting/freewheeling over regenerative braking, and prefer regenerative braking over friction braking, as far as traffic, road conditions and weather permit.
There is no „coasting option“ directly available in most EVs. Some cars automatically decide between coasting and regen when you lift off from the accelerator, based on information from navigation and sensors. As of today, neither Tesla nor Lucid does this. You have to either hold the accelerator gently pressed, or switch the gear lever to Neutral (only when you feel comfortable doing so, and on your own risk!), to achieve coasting.