Make the sauce by melting the butter into 1/2 cup flour over medium heat, whisking until combined. Next, add milk, whisk until combined, and allow the mixture to reach a slow rolling simmer. Remove from heat, season with salt and pepper, and fold the cheese in to melt completely.
Meanwhile, toss the onions in a mixture of 1/2 cup flour and 1/2 tsp. salt until just coated. Add the onions into the same skillet used for the chicken and fry until golden brown and crispy, about 5 minutes. Remove onions and place on a plate lined with paper towels to drain.
Preheat oven to 350 degrees F. Next, layer the beans into a large casserole dish and top with the cream sauce. Top with onions and bake until bubbly, about 25 minutes. Remove from heat, cool for 5 minutes, and serve.