To the bowl of a stand mixer fitted with the paddle attachment (or large bowl and electric hand mixer), cream together the first 5 ingredients (through vanilla) on medium-high speed until light and fluffy, about 5 minutes.
Stop, scrape down the sides of the bowl, and add the next 5 ingredients (through optional salt), and mix on low speed until just incorporated, about 1 minute; don’t overmix.
Add the candy corn, white chocolate chips (or peanuts), and mix until just incorporated.
Important note – Strategically place candy corn so that it’s not baking directly on cookie sheet because it will melt, burn, or turn runny if it is. The candy corn pieces need to be in the interior of the cookies, shielded and buffered by dough.
Allow cookies to cool on the baking sheet for about 5 minutes before transferring to a wire rack to finish cooking.