Preheat the oven to 400°F. Lightly grease an 8x8-inch baking dish.
Bring a large pot of water to a boil. Add the green beans and cook for 7-9 minutes, until tender with only a little bite. Taste one before draining, as thicker beans may need longer. Rinse under cold water to stop cooking, drain thoroughly, and pat dry with a clean kitchen towel.
Heat 2 tablespoons olive oil in a large skillet over medium heat. Add the onion and ½ teaspoon salt. Cook for 10-12 minutes, stirring occasionally, until softened and golden. Reduce the heat if needed to prevent burning. Add the garlic and thyme and cook for 30-60 seconds, until fragrant.
Meanwhile, blend the cannellini beans, soy milk, broth, nutritional yeast, cornstarch, Dijon, soy sauce, onion powder, pepper, and remaining ½ teaspoon salt until completely smooth.
Pour the sauce into the skillet. Bring to a gentle bubble over medium-low heat, stirring frequently, then cook for 2-3 minutes, until thick and creamy. Stir in the lemon juice, then taste and adjust the seasoning.
Fold the dried green beans into the sauce until generously coated. Transfer to the prepared pan and spread evenly.
Toss the panko with 1 teaspoon olive oil, then gently mix in the crispy fried onions. Sprinkle over the casserole.
Bake for 15-20 minutes, until bubbling around the edges and golden on top. Let stand for 10 minutes before serving.