Preheat your oven to 350°F (175°C).
Trim the green beans and cut them into 1-inch pieces.
In a large skillet, melt the butter over medium heat and add the diced onion.
Add the minced garlic and sliced mushrooms to the skillet.
Cook until the mushrooms are browned and the liquid has evaporated, about 5-7 minutes.
Stir in the heavy cream and soy sauce, mixing well to combine.
Season with salt and pepper, adjusting to taste.
Fold in the green beans, coating them thoroughly with the sauce.
Transfer the mixture to a baking dish and top with crispy fried onions.
Bake for 25-30 minutes, until bubbly and golden on top.
Remove from the oven and let it cool slightly before serving.