This is almost certainly the non-canonical Dorothy of Oz by Roger S. Baum, L. Frank Baum's grandson.
- The silver slippers have lost most of their magic and can only be used two more times
Dear Dorothy, the silver shoes wil take you to Oz and back home again. The Impassable Desert has taken away much of their power, so they can be used only twice more. Love, Princess Ozma and Glinda
Baum, Roger S., Dorothy of Oz, Books of Wonder, 1989. p. 7
- Replacing the magical brick that keeps the protection spell in place:
"The secret of the Yellow Brick Road is known by only a few citizens of Oz [...] The Good Witch of the North, at the request of the great and powerful Wizard of Oz, mixed the first brick laid for the Yellow Brick Road with magical ingredients."
ibid, p. 90
As the Queen pushed the brick closer, it glowed a brighter and brighter yellow. Her Majesty pushed and pushed the brick [...] with all of her remaining effort, she pushed the yellow glowing brick one more time. It slid into place. The magical brick's yellow glow spread from one brick in the road to the next.
ibid, p. 102
Other key plot points of this book: The primary antagonist is "The Jester", who derives his power from the Wicked Witch of the West's stolen wand. At one point in the book, Dorothy and friends attempt to escape from a maze that the Jester created before time runs out. Eventually, they trick the Jester, who is turning Oz celebrities into china dolls, and reclaim the wand.
This book is darker that the L. Frank Baum books, and the Jester is a particularly sadistic villain, but it is still a children's book.
The book is available to borrow from the Internet Archive: https://archive.org/details/dorothyofoz0000baum/
Source: One of the few Oz-inspired books remaining on my bookshelf!