Preheat the oven and prep the baking dish. Set the oven temperature to 375°F. Lightly grease a 9×13 baking dish with olive oil.
Prep the green beans. Trim off the ends of the green beans and cut the green beans in half. Bring a large pot of water to a boil. Blanch the green beans for about 5-6 minutes until they’re tender yet crisp.
Transfer to an ice bath. Strain the green beans with a colander and then immediately transfer the green beans to an ice bath for 2 minutes. After two minutes drain the green beans again, and carefully dry them with a few paper towels. Set them aside while you make the sauce.
Sauté the shallots. In a large skillet over medium heat, melt the oil or butter. Add the diced shallots and 1 teaspoon of salt. Cook for 3-4 minutes or until translucent.
Add the mushrooms and aromatics. Add the chopped mushrooms and cook for 6-8 minutes or until the mushrooms have softened. Once the mushrooms have softened, add the coconut aminos, minced garlic, remaining salt (1 teaspoon), and black pepper. Cook for 30 seconds or until the garlic is fragrant.
Add the flour. Sprinkle in the gluten-free flour and cook for another minute, stirring constantly.
Pour in the chicken broth: While whisking, slowly pour in the chicken broth to deglaze the pan. Whisk until the flour is smoothly incorporated, scraping any brown bits from the bottom of the pan, about 1-2 minutes.
Pour in the milk. Whisk in the coconut milk and almond milk until combined.
Simmer the sauce. Bring the sauce to a simmer, while whisking continuously. Simmer for about 5 minutes, until thickened, then remove the skillet from the burner.
Assemble the casserole. Add the green beans to the baking dish and pour the creamy sauce over the top. Mix to combine until the green beans are well coated. Bake for 22-25 minutes until the green beans are mostly tender.
Add crispy topping. Remove the green bean casserole from the oven. Let the casserole cool for 10 minutes before serving. Top with the crispy shallots or onions if desired.