First, let her out with sufficient time to pee before you leave. Do not rush her.
Next, put her in a kennel that is not much bigger than her length-wise. Make sure it is tall enough for her to easily stand up without touching the roof. Put towels over all the sides (on the outside as a cover) except the opening gate. This will turn it into more of a den for her. Put her fav bed inside.
You can put a small hanging type water bowl in her kennel for her so she does not get thirsty. Make sure it is the type she can use and not knock over and spill. Don't forget to put a toy in there, too.
The main secrets to successfully using a kennel while you are gone are two. First, teach her with treats inside the kennel that it is a safe, enjoyable place to be. Feed her supper in the kennel if need be. Second, do not get a big kennel. That will only make her feel comfortable in peeing at the other end of where she lays in the kennel. By keeping it small to her length and bed spot, she will not be able to "go to the corner" and pee without wetting her bed. Dogs do not want to pee their beds if they can help it, so make it so she can't pee in there without wetting her bed. If the only kennel you can find is too long or large, then simply place something large in there with her to block her access to the area and reduce the size.
When you get home, first things first. Pick her up, praise her and carry her out to pee. Assuming no medical reasons for her peeing, she needs to re-learn her in-house toilet manners.
In the 50+ years I have been training dogs, once trained, all of my dogs have been able to easily go 14+ hours loose in the house without ever having any accidents. I also literally teach them all to pee on command so that I can make sure they have peed before I have to leave them alone.