The usual treatment for BV is to take a one- or two-week run of antibiotics. I've never heard of a doctor prescribing a medication that you take only 'every time you have sex,' unless you mean you begin a new run of antibiotics and go through with the whole many days of it, after you have had sex. Does the doctor also prescribe a run of the same antibiotics for your sexual partner at the same time? It's not by any means agreed among doctors, but mine was of the opinion that one's partner can give BV right back if he doesn't take the same kind of antibiotics at the same time.
Gosh, that definitely would be frustrating!! Was your partner treated for BV? You actually CAN pass it back and forth. Also, never douche as it can create an environment for this bacteria to grow. Change undies often. This bacteria likes damp environments. BV is hard to get rid of and up to 50 percent of women that have it get a recurrence. https://www.webmd.com/women/guide/what-is-bacterial-vaginosis#1
So, make any guy you are with use a condom. Don't use soap on your vagina (and don't douche).
Now, I'd request a hormone check to see how out of balance you are. Being out of balance with your hormones can change our vaginal PH and make you prone to BV. It also can make you lack natural lubrication. So, get those checked. Have a doctor you can go to?