Preheat oven to 400°F (200°C).
In a large skillet or pot, melt butter over medium heat. Add onion, carrots, celery, and potatoes. Cook for 8-10 minutes until vegetables start to soften.
Sprinkle flour over the vegetables and stir for 1-2 minutes to cook out the raw taste.
Slowly whisk in chicken broth and milk. Bring to a gentle simmer, stirring constantly until the sauce thickens (about 5 minutes).
Stir in shredded chicken, peas, thyme, maple syrup, salt, and pepper. Cook for another 3-4 minutes until heated through. Taste and adjust seasoning.
Pour the filling into a 9-inch deep-dish pie plate or 2-quart baking dish.
Roll out the thawed puff pastry slightly if needed and place over the filling. Trim excess and crimp edges. Cut a few slits in the top for steam to escape. Brush with beaten egg.
Bake for 25-30 minutes until the pastry is golden brown and filling is bubbly. Let rest 10 minutes before serving.