:max_bytes(150000):strip_icc()/beef-beer-potpie_0-92a68b3c8eca4f5c8b88f0a95e09c0a9.jpg)
Preheat oven to 425°F. Heat the oil in a 10-inch cast-iron skillet over medium-high. Toss together the beef, salt, pepper, and 2 tablespoons of the flour in a medium bowl. Add to skillet; cook, stirring often, until the pieces are browned on all sides, about 8 minutes. Add the leeks, carrots, and 1½ tablespoons of the thyme. Cook until the vegetables begin to soften, about 4 minutes. Add the beer; cook 1 minute, stirring to loosen any browned bits from the bottom of the skillet. Whisk together the stock and the remaining flour; add to the skillet and bring to a simmer, stirring frequently. Reduce heat to medium; cook, stirring occasionally, until the beef is tender and the sauce thickens, 30 to 35 minutes, adding the squash after 15 minutes.
Roll out the puff pastry gently into a 12-inch square. Place the pastry over the simmering beef mixture. Whisk together the egg and water; brush over the pastry. Cut several slits in the center of the pastry. Bake in oven until the pastry is golden brown, about 15 minutes. Sprinkle with the remaining thyme.