Preheat the oven to 400F. Lightly grease a 9x13 baking dish with cooking spray.
Mix together the ingredients for the topping. Set aside.
Place the green beans in a large microwave safe bowl and along with ½ cup water and cover with plastic wrap. Microwave on high for 6-8 minutes until slightly tender. (They will continue to cook in the oven.)
In a large skillet over medium-high heat, melt the butter. Add the shallots and mushrooms and cook for 7-10 minutes until the mushrooms have released their liquid and started to soften.
Add the garlic, salt, pepper and thyme and cook for another minute.
Sprinkle in the gluten-free flour and cook for another 2 minutes, stirring constantly.
While whisking, slowly pour in the chicken stock. Whisk until the flour is smoothly incorporated.
Pour in the milk and cream and bring to a simmer. Simmer for about 5 minutes, until thickened. Season to taste with salt and pepper.
Drain the steamed green beans and pour into the prepared baking dish. Pour the sauce over the green beans and mix to combine.
Bake for 20-25 minutes until the green beans are mostly tender. Remove from the oven and sprinkle over the topping. Bake for another 5-10 minutes or until bubbly and golden.
Let cool for 10 minutes before serving. Enjoy!