Preheat the oven to 350F/175C. In a large mixing bowl mash bananas with a potato masher or with a fork. You can leave bits of banana in, it doesn't have to be completely pureed.
Place butter in a small saucepan and melt over medium-low heat.
Once the butter is melted, stir it continuously to prevent burning. Once the butter has been browned, turn off the heat and continue stirring the browned butter for another minute. Brown butter adds a nutty flavor to the banana bread.
Add eggs, milk, sourdough discard, and sugars and mix well. Then, slowly pour the browned butter while continuously stirring the mixture.
Then, combine gluten-free flour, cinnamon, baking powder, and xanthan gum (if using) in a separate bowl and whisk to incorporate.
Finally, add dry ingredients to the bowl with wet ingredients and whisk to combine but avoid overmixing. Mix until you don't see white streaks of flour in the batter. Cover the bowl with a kitchen towel and let the batter sit for 5-10 minutes. During this time the flour will absorb liquids and the batter will be more stable.
Grease a bread baking pan (9x5 inch, 23x12cm) with lard, butter, coconut oil, or any other fat you have on hand. Then, transfer the banana bread batter into the bread pan using a rubber spatula. Spread the batter evenly in the pan with the spatula and add sliced banana to the top for decoration (optional).
Bake for about 1 hour or until the bread is firm to the touch and the toothpick comes out with 1-2 crumbs. Keep checking on the bread at the 30,40, and 50-minute mark to make sure it is not browning too much on the top. If it is, cover the banana bread with foil and continue baking (I did not have to do that but all ovens are different!).
Once the bread is baked, separate the sides of the bread from the bread pan using a metal spatula, then carefully transfer the banana bread onto a cooling rack. If you don't have a cooling rack, place the banana bread in a way that all sides are getting aired out until completely cooled down. If you don't air out the bread during the cooling stage, it will get soggy on the bottom!
Serve with some butter, maple syrup, or honey! Enjoy!