Peeing and sex

Back in February I lost my virginity, the first time my bf and I did it, I felt like I had to pee so I told him to stop bc if the pain and bc I felt like I was gonna pee. Then we broke up and I haven’t had sex with anyone else and somehow we got back together and we decided to have sex again, I told him it hurt. I then decide to buy a dildo so I could try it and loosen the pain, the first couple time it hurt but after a while it didn’t. But everytime I tried it with the dildo I kept getting the feeling that I had to pee so I went to the bathroom and then tried again and it still felt like I had to pee. Now I’m scared I have to pee everytime I have sex