So then you add different greasy groups to new compounds and screen those. So will be worse, but sometimes some will be better. Then you look at the better ones, like having a nitrile group off the 1' position of the ribose and maybe that started as an amine (I'm making shit up here) and they decided to make it stick further out (IDK).
Anyway, I did some quick looking at it seems like remdesivir is a prodrug that gets modified by other enzymes to become triphosphorylated and then incorporated into the RNA genome of the virus (https://www.nature.com/articles/nature17180/figures/1). So they got super lucky finding it! Check out that paper for the story.