F1 visa being cancelled when immigrant visa is denied is possible. I have yet hear any case of this happening. It is possible that it happened in the past but no one have ever recorded the case over the internet.
The only source of the idea that F1 will be cancelled when immigrant visa is denied is in this article:
http://www.wolfsdorf.com/DVarticles/DV 2004 Update.pdf
The reasoning behind this cancelation is because the conflict of intention between the two type of visa. F1 visa holder can not have an immigrant intent while applying for immigrant visa like the DV surely show an immigrant intent. Sounds fair? Absouletly not..but I have said before in this forum that U.S immigration system is very odd.
Visa is an entry permit while I-20 is a permit to stay in the country. You don't need to have a valid visa while studying in the U.S. All you need is a valid I-20 throughout your study.
You will not have any problem renewing an F1 visa if it has been dormant for several years. When I started my study in the U.S, I didn't go back to my home country for 5 years, and I just let my visa expired. I renewed my F1 visa after 5 years expired, and I encountered no problem whatsoever. When I was renewing my F1 visa, the U.S Embassy put me on a priority appointment for the visa interview and it only took 1 day for them to issue my visa. All they asked is my transcript from the University to see if I have been a full time student throughout my stay in the U.S.
In matter of fact, the U.S embassies and consulates are encouraged by the Department of State to reissue F1 visa to students that want to continue their study.
Here is a quote of a letter from Secretary of State, Condoleezza Rice, to the U.S embassies overseas:
http://travel.state.gov/visa/laws/telegrams/telegrams_2734.html
6. Visa renewal during course of study: Some students
have to apply for new visas if they go home or travel
during their period of study. Returning student
applications should generally be reissued in the normal
course of business, unless circumstances have changed
significantly from the time of previous issuance.
Students should be encouraged to travel home during their
studies in order to maintain ties to their country of
origin.. If students feel that they will encounter
difficulties in seeking a new student visa or that a visa
will not be issued to them so they can continue their
studies, they may be less inclined to leave the United
States during their studies and hence may distance
themselves culturally from their homeland. Posts should
facilitate the reissuance of student visas so that these
students can travel freely back and forth between the
homeland and the United States.
All of F1 visa holder in the U.S that is going through the DV process is risking of loosing their F1 visa but because the reward of obtaining the visa is greater than the risk, people are willing to go through with it.