Preheat the oven to 450°F. Line a large baking sheet with parchment paper or a silicone baking mat. Set aside.
For the baked onions: (You can start step 3— the green beans— while the onions bake.) Cut the onion in half, then thinly slice. Add the flour into a large zip top bag. Pour the Panko, salt, and pepper into a medium bowl, and whisk the egg and milk together in another medium bowl. To make things a bit easier, use one hand for wet and the other for dry. First, seal the bag and shake until all the onion slices are coated evenly. Then, dunk a few onion slices into the egg mixture. And then, give them a dunk into the Panko, coating them well, pressing to ensure it sticks. Place onto the prepared baking sheet. Repeat with the rest of the onions. Bake the onions until golden brown, about 25 minutes. Flip them twice during this time. Set aside. Reduce the oven to 425°F.
Bring a pot of water and 2 Tablespoons of salt to a boil. Add the green beans and blanch for 3 minutes. Drain and immediately place into a large bowl filled with ice water to stop the cooking process— this helps the green beans stay a vibrate color. Drain again and set aside.
For the casserole: Over medium-high heat, melt the ghee in a large 10-12 inch ovenproof skillet. Add the mushrooms, onion, garlic, 1 teaspoon salt, and pepper. Cook, stirring occasionally, until the mushrooms begin to give off some moisture and the onions soften— about 5 minutes. Add the chicken broth and simmer for 3 minutes. Lower the heat to medium-low.
Combine the milk and cornstarch by stirring until no lumps remain. The best way to do this: add the cornstarch to a large measuring cup or bowl, then add the milk slowly while stirring. Add the milk/constarch mixture to the skillet. Stirring occasionally, cook until the mixture is thick— about 10 minutes or longer if you prefer a thicker sauce.
Remove from the heat and add the green beans and 1/4 of the baked onions. Give it a stir, then top with the remaining onions and bake until bubbly, about 10 minutes. Remove from the oven and enjoy!
Leftovers keep well in an airtight container in the refrigerator for up to 4 days. Reheat as desired.