Preheat the oven to 375°F. Lightly grease a 9x11 baking dish or similar sized baking dish with cooking spray, set aside.
In a small saucepan over medium-low heat, melt the butter. Whisk in the flour, garlic powder, onion powder, salt, and pepper until combined. Cook for 1 minute, whisking constantly.
Slowly pour in the milk and bring to a simmer, stirring constantly until thickened, about 3 to 5 minutes.
Take off the heat and stir in 1 cup of the cheese until smooth.
Add the sour cream and stir until smooth, set aside.
Layer half of the pierogies in the bottom of the baking dish.
Pour half of the sauce on top. Add half of the kielbasa.
Add another layer, repeating the same steps. Top with the remaining cheddar cheese.
Cover with foil and bake for 15 minutes. Take off the foil and bake an additional 15 minutes, until bubbly along the edges, the cheese is melted and it is hot all the way through.
Garnish with optional scallions and serve.