He can afford it as long as the stock market remains convinced Tesla deserve to be the most valuable car company in the world while being outside the top ten in sales ...
(I count "can make Starship on the side" as a QED of "making bank").
Regardless of how Starship concludes, when it does so it saves them ongoing costs, and turns "small profit" into "huge profit": either Falcon becomes redundant, or the R&D team does.