Preheat your oven to 375°F (190°C).
In a large skillet, melt butter over medium heat and sauté onions, carrots, and celery until softened, about 5-7 minutes.
Add the flour to the skillet and stir to combine with the vegetables, cooking for another minute.
Gradually stir in the chicken broth and milk, mixing well to avoid lumps.
Bring the mixture to a simmer and stir until it thickens, about 3-5 minutes.
Stir in the shredded chicken, peas, salt, pepper, and thyme, mixing until evenly combined.
Transfer the filling to a greased casserole dish and spread it evenly.
Bake in the preheated oven for 25-30 minutes, or until the filling is bubbling and golden on top.
Remove from the oven, let it cool for a few minutes before serving.