Place the butter and brown sugar in a large bowl or a stand mixer fitted with the paddle attachment. Beat together on medium speed until just combined. Stop and scrape down the sides of the bowl with a rubber spatula, as needed.
Slowly add in the flour, 1 cup at a time. Mix briefly after each addition. The dough will be fairly thick and soft.
Form the dough into a disc and cover with plastic wrap. Refrigerate for 1 hour.
Preheat the oven to 325°F and line 2 large baking sheets with parchment paper. Remove the dough from the fridge and let it sit for a few minutes if it is too firm.
Dust the dough with gluten-free flour on both sides and use a rolling pin to roll as large as you can with about ⅓-inch thickness. (Making the cookies this thick helps them keep their shape while baking and also gives a delicious bite.)
Cut out shapes with your favorite cookie cutters and place on the prepared baking sheets. Use an offset spatula to loosen any stuck dough.
Once you've filled a baking sheet with cookies, add some sprinkles if desired and place the baking sheet in the fridge for 15 minutes for the cookies to firm up. (If they are not cold before baking, they will spread.)
Bring dough scraps together into a ball and re-roll, cutting cookies until all the dough is used.
Bake chilled cookies in the oven for 8-10 minutes. The cookies will feel smooth to the touch and be pale in color when you remove them. Timing may vary slightly depending on the size of your cookie cutters.
Let cool on the baking sheets until you are able to handle them, then carefully transfer to a wire rack for the cookies to cool completely. They will be delicate.
Baked cookies can be stored in an airtight container at room temperature for up to 5 days. Cookie dough can be wrapped in plastic and stored in the fridge for up to 3 days before rolling and baking.
Notes
*To make these shortbread cookies dairy-free and vegan, use your favorite dairy-free butter.
This may make the cookie dough a bit softer, so you may need to add 1-3 tablespoons of extra flour in the dough. If using unsalted butter, add ¼ teaspoon salt.