Preheat oven to 375°F and grease a 9×13-inch baking dish with a little olive oil.
Bring a large pot of salted water to a boil. Add the green beans and cook for 3 to 5 minutes. Immediately plunge them into an ice water bath, and then drain well.
Heat 1 tablespoon of olive oil in a large skillet over medium heat. Add the sliced onion and sauté until soft and lightly browned, about 5 minutes. Transfer the onions to a bowl.
In the same skillet, pour in the remaining 1 tablespoon of olive oil. Add the sliced mushrooms and sauté until they are browned, about 5 minutes. Then, mix in the minced garlic and thyme, cooking for an additional 1 minute.
Sprinkle 3 tablespoons whole wheat flour over the mushrooms and stir for 1 minute.
Slowly whisk in the chicken broth and almond milk. Stir continuously until the sauce begins to thicken, about 3-5 minutes. Then, mix in 1/4 cup of the Parmesan until smooth. Season with salt and pepper.
In the prepared baking dish, layer the blanched green beans. Pour the mushroom sauce over them. Gently stir in the sautéed onions.
In a small bowl, combine the whole wheat panko breadcrumbs with the remaining 1/4 cup grated Parmesan cheese. Sprinkle this topping evenly over the casserole.
Bake until bubbly and golden, about 25-30 minutes.
Let rest for 5 minutes before serving.