Hi there
Speaking from experience (i get uti all the time) i personally wouldnt recommend having sex while you still have the infection or are still taking medicine for it.
I have done this before and it just made it worse before it made it better even tho the symptoms had gone
But everyone is different and you might be ok with it