Regenerative braking uses the car’s kinetic energy to crank the generator, which can recharge the battery while braking the car. It can’t hold the car at a complete stop because there’s no regen when the car’s not moving. Engineering the vehicle to "creep" or not to "creep" once it’s stopped is a separate issue.