Preheat the oven to 350ºF. Prepare 2 to 3 rimmed baking sheets lined with parchment paper. Set aside.
In a large mixing bowl, whisk together flour, xanthan gum, baking powder, salt, and sugars. Whisk in the eggs, one at a time, making sure that the mixture is well-blended before adding the next one. Once all the eggs are in, add butter, eggs, and extracts, and whisk until homogenous, thick, and smooth.
Divide the cookie dough into two. Wrap one piece in plastic wrap and set aside. Put the other piece in parchment paper (or another plastic wrap), add about ⅛ teaspoon of the beetroot puree, and knead the dough until the desired red color has been evenly formed.
Divide both doughs into a teaspoon-sized or 10-gram pieces, then roll each one into a small, 4-inches long log. Cover the balls with plastic wrap as you shape the other ones to make sure that they don’t dry out.
Take one uncolored and one colored log, pair them together, and twist them in opposite directions to twirl. About 3 or 4 turns should do, so be careful not to overtwist them as the dough may crack or break. Once your shaped cookie dough looks like a rope, bend one end into a hook so that it resembles a candy cane. Do the same process with the remaining dough and place the done ones, about 1-inch apart from one another, onto the prepared baking sheets. You should end up with around 40 candy cane cookies.
Bake the dough, turning halfway, for about 9 minutes in total or until the cookies are puffed and the edges are starting to brown. Remove from the oven and cool down to room temperature before handling or packaging. Enjoy!