Preheat your oven to 350°F. Line baking sheets with parchment paper or silicone baking mats.
In a large bowl, whisk together the gluten-free flour, xanthan gum (if using), baking soda, baking powder, and salt. Set aside.
Using a stand mixer or hand mixer, beat the butter and peanut butter together until creamy and fluffy. Mix in both sugars until smooth.
Add the egg, milk, and vanilla extract, beating until well combined.
Slowly incorporate the dry ingredient mixture to form a cohesive dough. Stir in 1 1/4 cups of M&Ms by hand.
Using a small cookie scoop (#60 size), portion the dough into balls and place them onto the prepared cookie sheets, leaving about 2 inches between cookies.
Bake for 9-10 minutes. The cookies should appear slightly underdone—this is key for staying soft!
Remove the cookies from the oven, press a few extra M&Ms onto the tops, and allow them to cool on the parchment for 2-3 minutes before transferring them to a wire rack.