Grease and line a 9-inch square baking pan or a 9-inch x 13-inch x 2-inch baking pan and set it aside. Preheat your oven to 350°F.
In a medium-sized bowl, place the flour, xanthan gum, baking powder, baking soda, and salt, and whisk to combine well. Set the dry ingredients aside.
In the bowl of a stand mixer fitted with the paddle attachment or a large bowl with a handheld mixer, place the butter and granulated sugar, and beat on medium-high speed until light and fluffy (about 5 minutes).
Add the egg, egg yolk, and vanilla and beat to combine. Add the confectioners’ sugar, and beat until smooth, then the sour cream and beat again until smooth. Add the dry ingredients and mix until just combined. The cookie dough will be thick but relatively soft.
Transfer the cookie dough to the prepared baking pan. Using a moistened spatula, spread it into an even layer in the prepared pan. Sprinkle the top evenly with a thin layer of vanilla sugar (about 3 tablespoons). Turn the pan toward each side to distribute the sugar evenly over the top.
Place the pan in the center of the preheated oven and bake until set all the way to the center and a toothpick comes out clean (about 30 minutes for the square pan; about 22 minutes for the rectangular pan). Allow to cool completely in the pan before slicing into squares and serving.
Video
Notes
For the vanilla sugarTo make vanilla sugar, place granulated sugar and as many vanilla bean seeds as you’re willing to spare in a food processor. Pulse a few times.In place of vanilla sugar, you can of course use plain granulated sugar on top of the bars—or no sugar at all. If you’re partial to a buttercream frosting on your bars, use that!