A government credit still means Tesla gets paid the full price from a sale. So yes, Tesla got government money.
But yes, those credits have been vanishing for a while.