Tesla has to deduct the “cost” of issuing new shares for stock compensation like for their CEO. It’s not a cost as in they spent cash, but is deducted because it lowers shareholder value. A better sense of their actual profit/loss is their free cashflow which is positive even after your deduct ZEV credit sales.