Preheat the oven to 375°F. Cook the spaghetti in a large pot of salted water until al dente, then drain and set aside.
Melt 2 tablespoons of butter in a large skillet over medium heat. Add the onion and mushrooms and cook until the vegetables soften, about 5 minutes. Stir in the garlic and thyme and cook for 1 minute longer.
Sprinkle the flour over the vegetables and stir to combine. Slowly whisk in the chicken broth and milk. Continue cooking, stirring often, until the sauce thickens.
Add the shredded turkey, cooked spaghetti, and half the Parmesan to the skillet. Season with salt and pepper and stir until everything is evenly coated.
Transfer the mixture to a greased baking dish. In a small bowl, toss the panko breadcrumbs with the remaining 2 tablespoons of butter and remaining Parmesan, then sprinkle the mixture evenly over the top.
Bake for 20 to 25 minutes, or until the topping turns golden and the sauce bubbles around the edges.