you need to get senior blood work done and get her urine checked for an infection. Spayed females often will have spay incontinence as they age. There are meds for this.
otherwise, i've been putting pee pads down for my oldster when i'm going to be gone for more than a couple of hours. My old guy is 16+. My other one (passed in Aug at 16.5) had kidney failure that was diagnosed at about 15 years old. A dog door would be another option; just wouldn't work well where I live. Otherwise, maybe look into diapers. As they age, it really does become impossible to hold their urine for hours at a time. So, we just do what we can for the golden oldies.