eladts
Member
The instructions for Form 8936 states that one of the requirements to get the credit is that you are the owner of the vehicle. INAL, but the use of present tense implies that you cannot sell the vehicle before you file your taxes. It is trivial for the IRS to discover this and it is a low-hanging fruit for an audit.
You get the tax credit when you claim it on your tax return.
The only way you might lose it is if you're audited and the examiner concludes you specifically bought the car for resale.
Besides an audit, there's no mechanism in place to claw back the tax credit if/when you sell the car. There is no built-in "time limit" that triggers if you sell the car with respect to the tax credit.