Yes they will deduct the tax credit up front for a lease. For buy, you do it at the end of the year when you file taxes provided you qualify for it.
I also prefer to buy because I keep my cars for 5+ years. The e-tron is advanced enough for me and has sufficient range for 99% of my trips that I don't see the need to go for a longer range EV. Buy v/s Lease is something you will have to decide based on your car owning and driving habits.
You will have to consider the pros vs cons of each.
IMO, since technology in this space is improving every year and batteries (including EV) are consumable products so I choose to lease since I don't put a lot of miles on my vehicles (< 10k).
Look at the differences between 2019 and 2021. Look similar outwardly, but 18 more miles range, MIB 3 with Verizon as the carrier. Black optics. Improved SW bugs. Tech improves every year. Always under warranty and won't get stuck with big bill to replace some of the sensors/EV batteries. And in 5 years- even if you replaced those things- you would have old technology. How many us would want to have a certified remanufactured replacement iPhone 7 in 2021? It may be "new", and the camera, processor, screen, battery, etc are functional, but can't compete with the latest model. And I certainly don't want to pay sales tax on 100% of the vehicle when I can only pay for the portion I use.
[I had a B5 A4 that I was my last purchased vehicle. Even with my own trusted indy mechanic and get discounted OEM/performance parts- that car cost an arm and a leg out of warranty to maintain/fix things that continually broke/wore out. After throwing 2 rods thru the block and getting new engine, the transmission failure was the last straw where I decided to never buy again. With a lease, it's perpetual payments, but they costs are known and relatively fixed and I will always have the latest tech and a vehcile under factory warranty so that I can get "1st generation, brand new models like eTron without fear of all the engineering kinks not yet worked out.]
If you drive > 15k annual, purchasing will make more financial sense.
But the decision is a personal one since everyone's individual situation is different.
I leased. As expected, the Dealer gave me the $7500 discount up front. If I had bought, they would have given me the paperwork to file for a credit against my taxes. An upside to the Leasing was that I did not end up having to finance the the $7500 since it came off the cost up front.