Melt the butter in a large skillet over medium heat.
Sauté the onions, carrots, and celery until soft, about 5-7 minutes.
Stir in the flour, cooking for another minute.
Gradually whisk in the chicken broth and milk, stirring constantly to avoid lumps.
Bring the mixture to a simmer, then add the chicken, peas, and thyme.
Season with salt and pepper, adjusting to taste.
Transfer the filling into a greased baking dish and smooth the top.
Bake in a preheated oven at 375°F (190°C) for 20-25 minutes, until bubbly and golden.