Because Tesla doesn't have any dealerships, they need to spend a lot of money on sales staff.
SG&A (Sales, General, and Administrative) costs are not part of Gross Margin, but are necessary for Tesla to sell any car due to their unique structure. Redo the calculations, and take into account SG&A this time... you'll see that they're quite negative.
So for Tesla, you've got Gross Margins (car sales price - car construction price), AND SG&A (cost of sales staff), Capital Expenditures (aka: buying equipment / factory space), AND R&D costs to all take into account.
Capital Expenditures have to be large because its expensive for rampup. R&D can theoretically be cut (It'd suck to lose the Truck, Semi, or Roadster projects. But they're not strictly necessary for survival). So I think its reasonable to discount both CapEx and R&D costs.
But as long as Tesla plans on this "no dealerships" strategy, they'll necessarily need a large SG&A expenditure.
So that's the number I'm looking at to judge "profitability". Car sales (aka revenues) - Car construction prices - SG&A.
Strictly speaking, operating profits are "Revenue - Cost of Goods Sold - SG&A - CapEx". So I'm personally slightly more lenient than the technical definition of "operating profits", but stricter than the term "gross profit margin" (which is just Revenue - COGS).