I had endometriosis (I had a hysterectomy years ago), and used to get diagnosed with UTIs all the time. Make sure when they test that you actually have bacteria in your urine, and not just blood. If you don't have bacteria, you don't have an infection.
If you do have an infection each time, there are some things you can do to help prevent it - pee after sex every time. Yeah, not sexy, but UTIs aren't all that sexy. This helps flush bacteria from your urethra.
Make sure to drink plenty of water, don't hold your urine (go when you have to go).
Sex is probably painful because of the endo. Experiment with positions and how deep your partner goes. Some positions may be less painful than others for you, or you may be able to control the depth in some positions. If orgasms are painful for you, that's common, and I'm sorry. :(
I'm really sorry you have to go through this. It stinks.