Recurrent BV

Anyone deal with recurrent BV? This is my second bout of it since June. I’m currently 17 weeks pregnant. I take a daily probiotic, eat yogurt, and wear panty liners/practice good hygiene? Doctor just prescribed Flagyl but what can I do to prevent this from happening again?!! 😩