I'm in a similar situation with a different brand EV that was totaled after only 500 miles of usage.
While the leasing company currently owns the vehicle, they will get the payoff amount under the terms of the lease from the insurance company at which point the leasing company no longer owns the vehicle, you do. The insurance company has to offer you the vehicle for the salvage value, most people decline and the insurance company is free to sell it for salvage.
With an EV you can actually come out ahead of the game if your vehicle is totaled and you leased it. Let's take, for example, a $50k RAV4. The day you drive it off the lot with a lease the payoff amount is going to be around $38k. But if the vehicle is totaled the insurance company owes you $50k as that is what they are selling for (actually a bit more, they have to cover some of the other costs of purchasing the replacement vehicle such as tax, registration, etc), of that $38k will go to the leasing company and the rest to you.
Just be aware that some leases, such as Ally, can have gap coverage built-in but the flip side is they say that if they get a check from the insurance company that is for more than the payoff amount they get to keep the balance. So make sure your insurance company doesn't write one big check to the leasing company as you might not get back the balance.
In my case it was an apparently uninsured driver who hit me, the vehicle was insured but he was a named exclusion on the policy so the insurance company doesn't have to pay. I had uninsured motorist coverage so that provided coverage (plus no deductible in the case on an UM claim).
Bottom line, the person leasing the car can get the salvage rights if the car is totaled, something I'm considering if the price is right for the pristine battery pack and potentially other valuable EV parts.