Preheat the oven to 400°F.
Place the salted butter in a medium saucepan over medium heat.
Allow the butter to melt completely.
Add the diced onion to the saucepan.
Cook the onion for 2 minutes, stirring occasionally, until softened.
Add the minced garlic.
Cook for 30 seconds, stirring constantly, until fragrant.
Whisk in the all-purpose flour.
Cook the flour mixture for 30 seconds, whisking continuously.
Gradually pour in the chicken broth and milk while whisking constantly to prevent lumps.
Bring the mixture to a boil.
Allow the sauce to boil for 2 minutes, whisking continuously, until thickened.
Remove the saucepan from the heat.
Whisk in the garlic powder, onion powder, salt, black pepper, and dried thyme.
Stir in the frozen peas and carrots.
Add the cooked shredded chicken.
Stir until the chicken and vegetables are evenly coated in the creamy sauce.
Transfer the chicken mixture to an 8x8-inch casserole dish and spread it evenly.
If necessary, lightly roll out the thawed puff pastry and press together any seams.
Place the puff pastry over the casserole dish, allowing approximately 1/2 inch of extra pastry on all sides.
Cut 4 small slits in the top of the puff pastry to allow steam to escape.
In a small bowl, whisk together the lightly beaten egg and 1 tbsp water.
Brush a light layer of the egg wash over the puff pastry.
Bake for 25 to 30 minutes, or until the puff pastry is golden brown and the filling is hot and bubbling.
Remove the casserole dish from the oven.
Sprinkle with minced fresh parsley, if desired.
Allow the pot pie to rest for a few minutes before serving.
Serve warm.