Cut the butter into small cubes and cook in a light-colored saucepan over medium heat, stirring often, until melted and foamy. Continue cooking until the milk solids turn golden brown and the butter smells nutty. Remove from the heat immediately and pour into a heatproof bowl. Let cool until lukewarm, not hot.
While the butter cools, chop the chocolate bars into chunks and set aside.
Add the granulated sugar and brown sugar to the lukewarm brown butter. Stir with a spatula or whisk until smooth and glossy. Do not cream or whip.
Mix in the egg yolks until fully incorporated. Add the active sourdough starter and vanilla and stir until smooth and uniform.
In a small bowl, whisk together the flour, baking soda, baking powder, and salt. Add the dry ingredients to the wet ingredients, folding gently until about 25% of the flour remains.
Gently fold in the chocolate chunks until evenly distributed and no streaks of flour remain.
Scoop the dough into 2.5 oz balls and place on parchment-lined baking sheets. Cover and refrigerate for at least 5 hours, preferably overnight, to allow the flour to hydrate and the dough to firm up.
Preheat the oven to 180°C / 355°F. Arrange the chilled dough balls on parchment-lined baking sheets, leaving space between each cookie. Bake for 13–15 minutes (see tips section).
Remove from the oven and immediately reshape the cookies using a small bowl or large cookie cutter to give its final shape. Sprinkle with flaky sea salt. Let the cookies cool on the baking sheet for 5 minutes, then transfer to a wire rack to cool completely.