Preheat your oven to 350°F. Line a square baking pan or 9×13-inch baking dish with parchment paper or spray with non-stick spray for best results.
In a large bowl, combine the flour, cornstarch, baking soda, and salt by whisking until evenly mixed. Set the flour mixture aside for later.
In a medium mixing bowl, stir together the melted butter, dark brown sugar, and regular sugar until smooth and free of lumps. Add the eggs and vanilla, mixing until fully incorporated.
Gradually pour the wet ingredients into the dry ingredients using a rubber spatula or wooden spoon. Fold in the chocolate chips and M&Ms. The dough will be thick but pliable.
Evenly press the dough into the prepared baking pan, ensuring it reaches all the way to the edges of the pan. For a decorative touch, scatter a few extra M&Ms or chocolate chips over the top. Bake until the edges are golden brown and a toothpick inserted into the center comes out with just a few moist crumbs.
Bake for 26–30 minutes, until the top is lightly golden brown and a toothpick inserted near the center comes out with a few moist crumbs. Avoid overbaking for gooey bar texture.
Let the bars cool in the pan on a wire rack for at least an hour. Use a sharp knife on a cutting board to cut into squares or smaller pieces if serving a crowd.
These easy cookie bars are best enjoyed warm with a scoop of ice cream, but they can be stored in an airtight container for up to one week.