Preheat the oven to 400°F (200°C).
In a large skillet over medium-high heat, melt 2 tablespoons of butter. Add the diced chicken, season with salt and pepper, and cook until browned on all sides, about 5-7 minutes. Remove the chicken from the skillet and set aside.
In the same skillet, melt the remaining 2 tablespoons of butter. Add the chopped onion and sliced mushrooms. Cook until the vegetables are soft and browned, about 5 minutes. Stir in the minced garlic and cook for 1 additional minute.
Sprinkle the all-purpose flour over the mushroom and onion mixture. Stir continuously for 1 to 2 minutes to cook out the raw flour taste.
Gradually whisk in the chicken broth, ensuring there are no flour lumps. Stir in the heavy cream and bring the mixture to a gentle simmer. Allow it to thicken for about 5 minutes.
Return the cooked chicken to the skillet. Stir in the fresh thyme, and adjust seasoning with additional salt and pepper if needed. Remove from heat.
Pour the creamy chicken and mushroom filling into a 9-inch deep pie dish or an appropriately sized baking dish.
Unroll the thawed puff pastry sheet and gently drape it over the pie dish. Crimp the edges tightly against the rim of the dish to seal. Use a sharp knife to cut 3 to 4 small slits in the center of the pastry to vent steam.
Brush the top of the puff pastry evenly with the beaten egg.
Bake in the preheated oven for 25 to 30 minutes, or until the pastry is puffed and golden brown, and the filling is bubbling visibly through the vents.
Remove from the oven and let the pie rest for 10 minutes before serving.