The answer is that drugs and vaccines do different things.
Drugs treat the problem (sometimes before it starts - this is known as a prophylactic), whereas vaccines are intended to prevent the problem from starting in the first place, so vaccines are a form of prophylactic themselves.
One of the problem with drugs is that the vast majority of them have some side-effects, some serious, some not. In many cases, long-term taking of a drug will result in some damage to the taker. How serious this damage is depends strongly on the drug, how long it is being taken for, and how much is being administered. Vaccines, on the other hand, are generally well tolerated usually being comprised of either proteins from the species of interest or weakened/inactive forms of the pathogen they are preventing. Vaccines encourage your body to prevent harm from an invading pathogen by giving it something to recognize before an actual infection happens.
Vaccines are generally developed against parts of the infecting organism that the body can see - in the case of enveloped viruses (like SARS-CoV-2 and Influenza), this is the bits that poke through the viral envelope, such as the S (spike) protein or HA/NA of influenza.
These sites do change a lot and the virus is under selective pressure to evade the antibodies that bind to these sites, leading to breakthrough infections. However, the same happens for drugs - the virus is again under selective pressure from the drug, so drug resistance happens. Indeed, we have seen this happen in real-time with influenza, where the first generation of anti-influenza drugs (called Amantadines) are no longer effective because of changes in the proteins they target.
As it so happens, there is one drug for SARS-CoV-2 called Remdesivir. This is a nucleoside analogue, that pretends to be one of the nucleobases that comprise the genomes of RNA viruses, and it is effective against a range of RNA viruses. However, check out the side effects part... Resistance to this drug has been observed in the lab for SARS-CoV-2 and other viruses. You might think that it would be pretty hard to develop resistance to something that behaves as part of your genome, because the proteins that process the genome are fairly stable - they can only tolerate a few changes before they are no longer functional, but we still see resistance developing because there is some wiggle-room.
Drugs are being developed to target stable parts of the genome or bits that can't be mutated for a range of viruses, but it is very difficult to do because it requires massive screening of compounds for effectiveness, then screening for toxicity/side effects etc in the host(s), then further development to make the drug deliverable in a form that the body can uptake and transport and finally clinical trials.