You’re right, you will not be able to work in the company that you found while on an F1 visa. But, you’re not out of luck because you can sponsor yourself through the company that you create. As others answers point out, many other entrepreneurs have started on an F1 visa.
I suggest that you talk to an immigration attorney about the specifics of your situation to determine what steps you should take. At LawTrades, our immigration attorneys have helped other entrepreneurs sponsor themselves through their companies. Visit ourto see how we can help you!