Preheat the oven to 350F degrees. Line a 9×13-inch baking dish with parchment paper coated with nonstick cooking spray. Leave some of the parchment paper sticking up over the sides of the pan to make it easy to life the cookie bars out of the pan.
With an electric mixer, beat the butter, brown sugar, and granulated sugar together until light and fluffy. Add the eggs, vanilla, baking soda, and salt, mixing well while scraping down the sides of the bowl with a spatula to be sure all ingredients are incorporated.
Add the flour and mix on low speed to combine. Add the chocolate chips and mix just until combined.
Press half of the cookie dough into the bottom of the prepared baking pan.
Add the sweetened condensed milk and unwrapped caramels to a small pot and heat over medium-low heat, stirring often until the caramels melt and the mixture is smooth. Pour the filling over the cookie dough in the pan.
Use a spoon to drop the remaining cookie dough all over the caramel filling. It will not be smoothly spread out but will instead look like little chunks of cookie dough all around the caramel.
Bake the bars at 350F for 25-30 minutes, just until set.
Sprinkle the bars with sea salt flakes and allow the bars to cool completely. Once cooled, lift the bars out of the pan by the edges of the parchment paper and cut into squares with a sharp knife.