At a startup (before traction, employees, etc.), you are pretty much doomed if your technical cofounder quits even if you've structured the company with vesting, ownership of IP, etc. All the domain knowledge, architectural knowledge, etc. goes out the window when the person who wrote all the code leaves. It's very hard to drop someone else into an unfamiliar codebase and have them pick up where the original person left off, and you probably would've made many different decisions (about product, platform, languages, architecture) with a different team.
The real fail there is poor relationship management. Why did the cofounder quit? What was running through their head? Did they not really want to commit to a startup in the first place, in which case the business founder should've vetted them more thoroughly before starting the company? Or did they lose trust in the business founder's leadership, market knowledge, and integrity? Were their incentives never aligned to begin with?