Tesla is profitable, but income per share has been very low relative to share price. People who were short Tesla weren't necessarily betting on a bankruptcy, just that shareholders wouldn't put up with the low ROI for much longer. And depending on exactly when they shorted it, they might've actually made a profit.
In contrast, AI companies that are actually unprofitable are dependent on continuously raising additional money to sustain their operations, so a sudden drop in market confidence could become a self-fulfilling prophecy as it makes it more difficult to raise money which makes the business more risky which decreases market confidence in a downward spiral.
An actual product with huge demand is not enough to avert bankruptcy, you also need to serve that demand profitably (like Tesla does).