Preheat oven to 400 degrees F (200 degrees C). Spray a 8-inch baking pan with cooking spray. Mix cornmeal, flour, sugar, baking powder, salt, and xanthan gum together in a bowl. Cut in butter with 2 knives until reduced to pea-sized pieces. Whisk milk and egg together in a bowl; stir into the cornmeal mixture until just combined. Pour batter into prepared baking pan. Bake in the preheated oven until top is light brown, about 22 minutes.