Prep the pan and oven: Heat the oven to 350°F (175°C). Line the pan with parchment, leaving overhang for easy lifting.
Lightly grease the sides.
Make the shortbread base: In a bowl, whisk flour, sugar, and salt. Cut in the cold butter with a pastry cutter or your fingertips until the mixture looks like damp sand with small pea-sized bits. Stir in vanilla.
Press and par-bake: Transfer about 2/3 of the mixture to the pan.
Press firmly into an even layer. Bake for 15–18 minutes, until the edges are just turning lightly golden. Set the remaining 1/3 aside for the crumble topping.
Cook the caramel: In a medium saucepan over medium heat, melt butter with brown sugar.
Stir until the sugar dissolves and the mixture looks glossy, 2–3 minutes. Add condensed milk and salt, stirring constantly. Bring to a gentle bubble and cook, stirring, for 5–7 minutes, until slightly thickened and a shade deeper.
Remove from heat and stir in vanilla.
Assemble the bars: Sprinkle chocolate chips over the warm crust if using. Pour the hot caramel evenly on top. Crumble the remaining shortbread mixture over the caramel in small clumps, leaving some caramel peeking through.
Bake to set: Return to the oven and bake 20–25 minutes, until the top is lightly golden and the caramel is bubbling at the edges.
Cool completely: Let the pan cool on a rack for at least 2 hours.
For the cleanest slices, chill in the fridge for 30–60 minutes after cooling.
Slice and serve: Lift out using the parchment. Use a sharp knife, wiping between cuts. Finish with a light sprinkle of flaky sea salt if you like.