If an F-1 student would come to the US first and then later decides to file for an I-526, that would be permissible as long as the student does not travel abroad during the EB-5 process.
The F-1 is really intended for the student who plans only to attain an education and then go home. That said, the reality is that many students come and decide to stay. Congress has made it easier for STEM graduates to obtain an extended period of employment authorization post graduation if an employer wished to file for an H1-B visa for them. The H1-B allows for "dual intent" (to be a non-immigrant at the present time and pursue immigrant status). If an F-1 student were to come first and later had an immigrant visa (I-526) filed, then that student should not travel abroad until approved for adjustment of status.