Preheat your oven to 350°F. Grease or line a 9x13-inch baking pan and set it aside.
In a large bowl, place the flour, xanthan gum, baking powder, baking soda, salt, spices, and granulated sugar and whisk to combine well.
Add the brown sugar and mix to combine, breaking up any lumps.
Add the melted butter, oil, beaten eggs, water, and vanilla, and mix to combine. The batter will be relatively thick, but soft.
Scrape the batter into the prepared pan and spread it into an even layer with a moistened spatula. Shake the pan back and forth a bit to ensure even distribution of the batter.
Place the cake in the center of the preheated oven and bake until set in the center, about 25 minutes. A toothpick should come out mostly clean (never wet; may have a few moist crumbs attached).
Remove the pan from the oven and allow the cake to cool completely in the pan completely. It will take about 45 minutes at room temperature until completely cool.
Once the cake is cool, dust the top of the cake with a thin layer of (the optional) confectioners’ sugar. Slice into squares and serve.