Prep the pan: Heat oven to 350°F (175°C). Line a 9x13-inch baking pan with parchment, leaving overhang for easy lifting.
Lightly grease.
Mix the wet ingredients: In a large bowl, whisk melted butter, brown sugar, and granulated sugar until smooth. Whisk in eggs and vanilla until glossy.
Combine the dry ingredients: In a separate bowl, whisk flour, baking soda, baking powder, and fine sea salt.
Make the dough: Add dry mix to wet mix and fold until just combined. Stir in chocolate chips, if using.
Dough will be thick.
Press the base: Press roughly two-thirds of the dough into the prepared pan in an even layer.
Make the caramel: In a small saucepan over low heat, melt caramels with heavy cream, stirring until smooth. Remove from heat and stir in vanilla.
Add the caramel layer: Pour warm caramel over the dough base, spreading evenly. Leave a small 1/4-inch border to prevent sticking to the sides.
Top with remaining dough: Crumble the remaining dough evenly over the caramel.
It’s okay if some caramel peeks through.
Bake: Bake 24–28 minutes, until the top is golden and the edges are set. The center should still look slightly soft.
Finish and cool: Immediately sprinkle with flaky sea salt. Cool in the pan on a rack for at least 1–2 hours, then chill 30 minutes for clean slices.
Slice: Lift out using the parchment and cut into bars with a sharp knife.