To file the I-526 petition the investment funds may be held in escrow until the I-526 petition is approved. The immigration rules state the investor may have already invested or be in the process of investing.
You could also place the money in an escrow account with release conditioned on approval. Some projects/regional centers will request use of the funds before I-526 approval. Either way, a reputable regional center or project should have refund mechanisms in place in the event of denial. Reviewing the project or regional center for these procedures is very important.