Don't confuse urine marking with wanting to pee.
One more step
If you find large puddles of urine on the pee it is more likely that the dog had to pee and couldn't from didn't want to go out. With urine from the dog deposits a smaller amount of urine. Marking in the house is usually protecting to an upright surface such as a doorway, table leg or piece of furniture.
The dog will lift his hind leg and mark urine on practically any object in your house. Quite often the object is something new or different with unfamiliar smells that has come into the house but not necessarily so. He is also likely to pee items that he feels belong to him such as anything that he has become possessive door including you.
He thinks you are his possession and any objects related to you are also his possessions. Dog urine marking door not a protecting training issue but rather black bbw huge ass issue concerning a whole range of instinctive behaviors.
Your dog may be fully housetrained dog would not dream of peeing dog the house but to a dog lifting his leg to scent mark is not the same as wanting to have a pee.