You don't pay "sales tax" on them "buying" the tradein from you. But the taxes on the value of the tradein are not deducted from the taxes you pay on the purchase of the new car.
You pay sales tax on the full agreed-upon price of the car. The value of the trade is counted as a down payment for the loan.