Does it help to know that my dd has and still sometimes does the SAME thing! I was truly worried. But she had no fever, she didn't do it all the time (though in my case, I couldn't figure out what made her not cry), so it was not a UTI and I refused to be worried into thinking so. UTIs hurt when you're peeing, true, but they also hurt when you're not. No. It wasn't a UTI in our case. Nevertheless, she still cried right before and during. Stopped right after. It was as if she never wanted to pee in her diaper if she didn't have to. She was EC'd from birth. I think she wanted to hold it, but her little muscles just weren't able.
I just communicated with her about it and cued her while she was in her diaper and told her that it's more comfortable to go in the toilet/sink, but the diaper is made for catching pee, too. She is 12 weeks old now and rarely cries during it anymore. In fact, it's getting hard to tell when she has to go bc she doesn't get fretful about it!