It seems as if you are offline so I will post my answer based on what you have stated.
Dogs do not know what they have done is wrong, especially when not caught in the act. The fact that they look guilty is that humans are giving off body language and vocal tones that tells the dog the owner is mad. So the dog starts to associate what is going on at that exact time with the owner getting that tone and body language. This means the dog can identify a particular room with the owner getting angry not necessarily the accident it had 2 minutes ago. Or at times, depending on how the owner handles the accident such as rubbing the nose in it , then the dog will eventually associate that act as being bad when with the owner and so they soon will not go in front of the owner even outside, then they come in and try to hide it.
Dogs this young still get distracted by outside activities , they may not go due to a distraction and then when things are calm , usually inside the home, they remember they have to go. So they have an accident inside.
It is very important to do potty training correctly from the start or you will forever have problems. Wee wee pads should not be used as a dog does not really decipher that from a rug on the floor.
Below is how to correctly potty train. If the dog is being punished, that needs to stop now.
I agree with you that the dog should be checked as well to make sure there is no UTI or something pressing on the bladder.
POTTY TRAINING starting over
Copyright Sally G
To start over the dog must not have run of the home because by allowing this you are setting the dog up to fail. So it is important the dog be kept in a crate or on a tether next to its bed and food bowls as dogs do not like to eliminate where they eat and sleep. If you can’t watch the dog 100% then the dog must be contained and sometimes when people get busy around the house they actually tether the dog to them so they can watch them
Clean all areas you know that the dog has urinated with a cleanser made just for dog urine or it will be attracted back to those spots and continue to eliminate there.
Take the dog out via a leash and give a potty command, such as “go potty” and continue to say go potty even as the dog is eliminating so the dog associates the command with the act. Once done eliminating, praise and reward the dog, but the reward must be special and something the dog will only get when it potties outside so it associates this with that command and the act. Something like hot dog slivers work well or cheese chunks.
Puppies should be taken out every two hours as well as after play, nap, and eating. Sometimes a puppy gets involved and actually forget that they have to go until it is too late. Also pups outside become distracted by wind, shadows, noises, etc. so it is important to redirect them if you feel that they are not finished going or when you bring them back inside then crate them, wait ten minutes and take them out again.
Inside the home , once you have cleaned all areas the dog is known to go in, start to sprinkle some of its kibble or treats in those areas so the dog begins to see them as an eating area. Eventually you can replace that with small bowls of water until the dog is fully trained