Preheat oven to 350°F. Melt butter in a large skillet over medium heat. Sauté onion and mushrooms until softened, about 6 minutes.
Sprinkle flour over vegetables and stir for 1 minute. Gradually whisk in chicken broth until smooth. Bring to a simmer and cook until thickened.
Remove from heat and stir in sour cream, heavy cream, half the Parmesan, garlic powder, salt, and pepper.
Combine sauce with cooked spaghetti and shredded chicken in a large bowl.
Pour into a greased 9x13 baking dish. Top with mozzarella and remaining Parmesan.
Bake uncovered for 30-35 minutes until golden and bubbling. Let rest 5 minutes before serving.