Tesla has a 20% gross margin, which is significantly better than most competitors. So they make lots of profit per car, lots more than they make from regulatory credits.
On a free cash flow basis, Tesla is profitable.
On a GAAP basis, Tesla is profitable.
If you remove all non-recurring revenue & expenses, Tesla is profitable.
Removing non-recurring revenue (aka regulatory credits) from their income statement is a useful exercise when trying to predict their future revenue. But if you do, you also should be removing non-recurring expenses too (mostly Musk's stock grant).