Veklury (remdesivir) was approved by the FDA for the treatment of Covid-19 in hospitalized individuals on October 22, 2020. This was a full approval, not an emergency use application: https://www.fda.gov/media/137574/download
We've continued using the vaccines under the existing EUAs even after a treatment was approved.
The FDA has granted additional EUAs for other treatments, even after that date: four more, not counting a sedative agent, per https://www.fda.gov/emergency-preparedness-and-response/mcm-... .
In fact, the FDA has even granted an EUA for a vaccine after approving Veklury: the Janssen/J&J vaccine received its first EUA on February 27, 2021. https://www.fda.gov/media/146303/download
Even if ivermectin was a perfect treatment for Covid, and even if an approved treatment would pull all the vaccines off the market -- despite that not happening after the FDA approved Veklury -- by the time ivermectin made its way through the approval pipeline to be labelled for this indication, the Pfizer and Moderna vaccines would very likely have received approval as well. So there's no "billions of vaccinations" at risk should another treatment be found to be effective and approved.