In a large bowl, beat 1 cup unsalted butter, 1¼ cups brown sugar, and ½ cup granulated sugar together for 3 to 4 minutes until pale and fluffy.
Add 2 large eggs and 2 large egg yolks, one at a time, mixing well after each addition. Stir in 1 tablespoon vanilla extract until fully combined.
In a separate bowl, whisk together 4 cups all purpose flour, 3 tablespoons cornstarch, 1 teaspoon baking soda, 1 teaspoon baking powder, and 1 teaspoon salt.
Add the dry ingredients to the wet ingredients and mix just until combined. Do not overmix.
Fold in 1 cup chopped roasted pistachios and 1½ cups chopped dark chocolate until evenly distributed throughout the dough.
Cover the dough and chill for at least 1 hour. Chilling ensures thick cookies and prevents spreading.
Preheat the oven to 375°F. Line baking sheets with parchment paper.
Using a ½ cup cookie scoop, portion the dough into tall mounds and place at least 3 inches apart on the prepared baking sheets. Do not flatten.
Press a few extra chocolate chunks and pistachio pieces onto the tops for bakery style presentation.
Bake for 12 to 14 minutes, or until the edges are lightly golden and the centers still look slightly soft.
Remove from the oven and sprinkle lightly with flaky sea salt, if using. Let the cookies cool on the baking sheet for 10 minutes before transferring to a wire rack. The centers will continue to set as they cool.