It’s also very important to know that it depends on the leasing bank and how they handle this/how it affects your DTI.
I paid all the remaining payments on my Tundra lease through Ally. Ally effectively closed the account and the payment shows as 0 as far as DTI goes
I paid all of my remaining payments on my Jaguar lease through Chase. Chase will not do the same and it still shows as $517/month despite all remaining payments being made
I would have to do a lease return or pay the entire balance and buy the car for it to be gone.
All of the above was done by choice before I knew 100% I was buying a house, but when my mortgage broker did the credit pulls, I found this interesting.