Set the oven to 350°F (175°C). Coat a 9x13-inch baking dish lightly with nonstick spray.
In a large skillet over medium-low heat, cook the bacon until crispy. Transfer to paper towels to drain, then crumble. Keep about 2 tablespoons of bacon fat in the skillet, discard the rest, and return the pan to medium heat. Sauté the onion, stirring now and then, for roughly 5 minutes until it turns translucent.
Add the mushrooms and cook, stirring occasionally, for 5 minutes until they are golden. Mix in the garlic and cook for 1 minute until aromatic. Stir in the undiluted mushroom soup, then return the crumbled bacon to the pan. Blend in the milk and cheese, stirring until the cheese melts. Season with salt and pepper. Fold in the green beans until evenly distributed.
Transfer the mixture to the prepared dish. Sprinkle the fried onions on top. Bake without a cover for 30 minutes until the casserole is heated through and bubbling.