Toss the thinly sliced onions with olive oil, flour, panko, and salt until evenly coated. Spread them out on a parchment-lined baking sheet and roast at 425°F for 20 minutes, stirring halfway through, until golden and crispy. Set aside to cool.
Bring a large pot of salted water to a boil. Add the trimmed green beans and cook for 5 minutes until just tender. Drain and transfer to a bowl of ice water to stop the cooking. Once cooled, drain again and pat dry with a clean towel or paper towel.
In a large skillet, heat olive oil over medium heat. Add the minced garlic and sauté until fragrant, about 30 seconds. Sprinkle in the flour and cook, whisking constantly, for 1 minute. Slowly pour in the milk, whisking until the mixture is smooth and thickened, about 2–3 minutes. Remove from heat and stir in the yogurt, Dijon mustard, soy sauce, ranch seasoning, salt, and pepper.
Add the green beans to a greased 9×13-inch baking dish. Pour the cream sauce over top and gently stir to coat. Sprinkle the crispy onions evenly across the surface, followed by an extra handful of panko for added crunch.
Bake at 375°F for 20 minutes, or until the casserole is bubbling and the top is golden brown.
Let it rest for 5–10 minutes before serving.