Which CarMax pays the most for my 2018 BMW M3

As the person above you stated. Once you buy the lease, you would pay the taxes. It would be difficult to get these taxes back from CA.

More details:

Why don’t you directly sell your leased vehicle to a third party and pocket the profit?