Preheat oven to 350°F and line 2 large cookie pans with parchment paper or silicon baking mats.
Add the butter (or shortening) to a bowl of a stand mixer fitted with the paddle attachment. Add the brown sugar and granulated sugar and mix on medium speed until creamed.
Add the egg and mix to combine. Mix in the vanilla extract and the pumpkin puree until thoroughly mixed.
In a separate bowl, whisk together the flour, xanthan gum, salt, baking powder, baking soda, and pumpkin pie spice. Add 1/2 of the flour mixture to the wet ingredients and mix until mostly combined. Add the remaining flour and mix until just combined.
Use a medium scoop (1 1/2 tablespoons) to scoop the dough onto the prepared cookie sheet. Dough should be about 2 inches apart. (The cookies won’t spread much so with my half-sheet pans I can bake 15 cookies per pan.)
Bake for 14-16 minutes or until cooked through. Let the cookies cool on the pan for 10 minutes before cooling completely on cooling racks. Frost and decorate when the cookies have cooled completely.
To make the cream cheese frosting, add the cream cheese and butter to the bowl of a stand mixer fitted with the paddle attachment. Mix on medium speed until light and fluffy.
Add the powdered sugar, vanilla extract, and lemon juice. Mix on low speed until combined then turn the mixer to medium speed and beat for 1 minute.
Leftover cream cheese frosting can be stored in the refrigerator up to 2 weeks.
Notes
For a dairy free version, use palm shortening in the cookies. For the cream cheese frosting, use dairy free cream cheese + 2 tablespoons vegan butter and 2 tablespoons palm shortening.