Looks like he may be territory marking, but it is unusual for him to be doing this indoors. he could be trying to impress her with his masculinity and also making sure that other dogs knows she's spoken for.
Problem is dogs can smell pee for weeks
Does he do it in front of you? Or when you are out? -if you are out it could be signs of anxiety
Sorry forgot to add -have you vet checked him for uti