Preheat the oven to 400°F. Place a 9-inch square baking dish nearby.
Melt the butter in a large skillet over medium heat. Add the cubed beef and cook until browned on all sides, about 5 minutes.
Add the diced onion, quartered mushrooms, and minced garlic to the skillet. Cook until the onion softens, about 4 minutes.
Sprinkle the flour over the mixture and stir for 1 minute to coat everything.
Pour in the beef broth, milk, Worcestershire sauce, rosemary, salt, and pepper. Stir and simmer until the gravy thickens, about 5 minutes.
Transfer the filling to the baking dish and spread it evenly.
Unroll the pie crust on a lightly floured surface. Cut it into 4 to 6 rectangle shapes to resemble tombstones. Place the shapes on top of the filling, leaving small gaps between them.
Brush the crust pieces with the beaten egg. Bake for 20 to 25 minutes until the crust is golden and the filling bubbles at the edges.