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. Stir regularly until the butter is almost completely melted.
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. Add the eggs, one at a time, whisking briskly after each addition. Stir in the vanilla.
Use a wooden spoon or silicone spatula to stir in the dry ingredients. Fold the chocolate into the dough until the remaining flour is incorporated.
If the dough seems warm or looks overly glossy, refrigerate for 5 minutes. Roll into balls using 3 tablespoons of dough for each.
Arrange on the prepared pans, leaving 3 inches in between each. 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, using a cold sheet pan for each batch.
