This fraud became worse the more negative the balance became since it became more and more misleading to users to continue to present themselves as a financially healthy business.
What they should have done instead is to not allow alameda to have an account with special rules and negative balances, and to actually operate their business as they claimed. They likely would have grown less quickly or even gone out of business, but sometimes the way you avoid fraud is indeed by going bankrupt instead of lying.
They also could have not lied to users, both about the status of alameda's account, and about the status of FTX's liquidity. Each time they made a statement about their exchange that excluded that materially relevant information was also fraud.
I do say all of this with full awareness that a large fraction of YC startups also "fake it until they make it", i.e. lie about what their product can do, lie about their financials, etc. Most YC startups are also committing fraud on a much smaller scale, and just manage to keep the scale small enough that no one goes to prison.