Start by making the pastry. Add the tapioca, cornstarch, sweet rice flour, sorghum flour, sugar, salt and xanthan gum to the bowl of a food processor fitted with the steel blade attachment and pulse to combine. Add the butter and pulse until the mixture resembles coarse crumbs.
Add three of the eggs, one at a time, and pulse just until the mixture comes together.
Turn out onto a work surface, dusted with rice flour and knead just until it comes together. Divide in half, pat each half into a disk, and wrap well with plastic. Refrigerate for 2 hours or up to 2 days.
Make the gravy. Melt 4 tablespoons of butter in a large skillet. Stir in the onion and garlic and saute until translucent. Sprinkle over the flour and stir until evenly incorporated. Whisk in the wine (if using) and the broth. Bring to a simmer and reduce heat, whisking constantly, until thickened slightly. Stir in the thyme and rosemary and taste for seasoning. Add salt and pepper to taste. Set aside.
Preheat the oven to 425 degrees F.
Remove dough from the freezer after it has chilled. Place a sheet of parchment on the counter and dust with rice flour. Unwrap the dough and place on the flour. Dust the top of the dough with more flour and top with a second sheet of parchment. Roll the disk into a 10-inch round with a rolling pin. Remove one sheet of parchment and place the round into a standard (9-inch) pie plate dough side down. Remove the second sheet of parchment. Trim dough so that it only overhangs the edge by 1-inch.
Add the chicken to the crust. Top with the frozen (or steamed, cooled) vegetables then pour the gravy over the top.
Roll out the second disk of dough following the procedure in the above steps. Carefully place dough over the chicken and veg and trim the dough to meet the edge of the bottom crust. Fold the edges of dough under and crimp. Make 4-6 slits around the center of the pie to vent it.
Whisk the remaining egg and brush over the top of the pie. Sprinkle with flaky salt and fresh herbs.
Bake for 35-40 minutes or until the pie is golden brown and the filling is bubbling. Cool for 10 minutes, then slice and serve immediately.