Preheat the oven to 200°C (180°C fan). Heat the butter in a large, deep frying pan over medium-high heat.
Add the diced chicken thighs to the pan, season with salt and pepper, and fry for 5-6 minutes until golden brown all over.
Reduce the heat to medium. Add the sliced leeks to the pan and sauté for 5-8 minutes until softened and sweet.
Sprinkle the plain flour over the chicken and leeks, stirring constantly for 1 minute to cook out the raw flour taste.
Gradually pour in the chicken stock, stirring continuously as the sauce begins to bubble and thicken.
Stir in the double cream, Dijon mustard, fresh thyme, and frozen peas. Simmer gently for 5 minutes, then remove from the heat.
Transfer the filling into an ovenproof pie dish and allow it to cool slightly to prevent the pastry from becoming soggy.
Unroll the puff pastry sheet and drape it over the pie dish. Trim any excess edges, crimp to seal the borders, and cut a small slit in the center of the pastry to allow steam to escape.
Brush the pastry evenly with the beaten egg.
Bake in the preheated oven for 25-30 minutes until the pastry is puffed, golden brown, and crisp.
Remove from the oven and let the pie rest for 5 minutes before slicing and serving.