Thanks for using health care magic.
It seems like you or your partner have mild infections and it gets cross transmitted while having sex.
It is advisable to get treatment for both of you in form of antibiotics. You may get prescription for your doctor.
You should also rule out repeated fungal infection
In case of fungal infection, Antifungal agents need to be added along with antibiotics.