The downturn in early 2022 hit them badly. They were losing money again when Elon bought them (one of the reasons he tried to pull out of the deal)
Admittedly the way he structured his buy out made it worse by adding more debt.