In a large pot, melt butter over medium heat. Add onion, garlic, carrots, and celery. Sauté until softened.
Stir in flour and cook for 1 minute.
Slowly whisk in chicken broth and milk, stirring to avoid lumps.
Add shredded chicken, peas, salt, pepper, and thyme. Simmer for 10 minutes.
Stir in heavy cream and corn. Cook for another 5 minutes until heated through.
Serve hot, topped with crumbled puff pastry for a classic pot pie flavor.