Preheat an oven to 360°F | 180°C. Line two baking sheets or sheet pans with parchment paper.
In a medium saucepan over the lowest heat possible, melt the butter. There should be no sizzle, crackling or pops; let the butter ooze into liquid, without boiling, so minimal moisture is lost. Stir regularly, until the butter is almost completely melted. (This is a good time to chop the chocolate.)
In a bowl, whisk together the flour, baking powder, baking soda and salt. Set aside.
Pour melted butter into a large bowl, and then whisk in the sugars. The mixture may look to seize, but will relax with a few seconds of stirring. Add the eggs, one at a time, whisking briskly after each addition, but only to combine. Stir in the vanilla. Use a wooden spoon or silicone spatula to stir in the dry ingredients. Once mostly blended, fold the chocolate into the dough until the remaining flour is incorporated and the dough no longer looks dusty. Bring any stray ingredients up from the bottom of the bowl. Do not over mix.
Using two spoons or a #20 disher, drop 3 tablespoon-sized balls of dough onto prepared pans, leaving 3 inches in between. Sprinkle with sea salt, if using. Bake in the hot oven until the tops are cracked and lightly golden, yet still soft at the center, 10 to 12 minutes, rotating pan halfway through cooking. Leave the cookies on the sheet pan for 2 minutes, then transfer to a wire rack to cool. Continue shaping and baking cookies with the remaining dough, making sure to use a cold sheet pan for each batch.
Cookies can be kept at room temperature in an airtight container for up to 1 week.