Preheat your oven to 350°F (175°C).
Cook the elbow macaroni according to package instructions and drain.
In a large saucepan, melt the butter over medium heat.
Add the flour and whisk for about 1 minute to form a roux.
Gradually pour in the milk, whisking continuously until smooth.
Stir in the garlic powder, onion powder, salt, and pepper.
Add the shredded cheese, stirring until melted and creamy.
Mix in the cooked macaroni and shredded chicken.
Pour in the buffalo sauce, stirring to combine.
Transfer the mixture to a baking dish and bake for 20 minutes until bubbly.