Brown the butter in a light-colored saucepan over medium heat, stirring constantly until it turns golden amber with brown bits, about 4-6 minutes. Pour into a heat-safe bowl and cool for 15-20 minutes.
Whisk both sugars into the warm browned butter until smooth and slightly thickened, about 1 minute. Add eggs and vanilla, whisking for 30 seconds until glossy. Stir in the sourdough discard until fully incorporated.
In a separate bowl, whisk together the flour, baking soda, baking powder, and fine sea salt until evenly combined.
Fold the dry ingredients into the wet with a rubber spatula until no flour streaks remain. Be careful not to overmix. Fold in the chocolate chips until evenly distributed.
Cover the bowl and refrigerate the dough for at least 1 hour, or overnight for the best flavor and thicker cookies.
Preheat oven to 375°F (190°C) and line baking sheets with parchment paper. Position racks in the upper and lower thirds of the oven.
Portion chilled dough into 2-tablespoon balls (about golf ball size) and place 2 inches apart on prepared sheets. Press extra chocolate chips on top and sprinkle with flaky sea salt if desired.
Bake for 10-12 minutes until edges are set and golden but centers look slightly underdone and shiny. Rotate sheets halfway through if baking two at once.
Let cookies rest on the baking sheet for 5 minutes before transferring to a wire cooling rack. Cool for at least 10 more minutes before serving warm or at room temperature.