Step 1
Place a rack in middle of oven; preheat to 350°. Lightly coat an 8x8" metal baking pan with nonstick vegetable oil spray, then line with 2 sheets of overlapping parchment paper, leaving a generous overhang on all sides. Lightly coat parchment with nonstick spray. Cook ¼ cup (31 g) all-purpose flour in a dry medium skillet over medium-high heat, stirring constantly to prevent burning and promote even toasting, until flour is tan and smells nutty, about 5 minutes. Immediately transfer to a small bowl and set aside.
Step 2
Whisk ¾ cup (1½ sticks) unsalted butter, room temperature, ½ cup (55 g) powdered sugar, 1 Tbsp. vanilla extract, and 1½ tsp. Diamond Crystal or 1 tsp. Morton kosher salt in a large bowl until smooth and sugar is dissolved. Add in ½ tsp. baking powder, remaining 1¼ cups plus 1 Tbsp. (164 g) all-purpose flour, and reserved toasted flour and mix with a rubber spatula until a soft dough forms and no pockets of unincorporated flour remain. (Don’t undermix. You want to form some gluten in this shortbread, so mix for at least 30 seconds.) Transfer dough to prepared pan and, using an offset spatula lightly coated with nonstick spray, spread into an even layer, working all the way to the edges. Bake shortbread until deep golden brown on top, 38–43 minutes. Let cool.
Do Ahead: Shortbread can be baked 1 day ahead. Cover and chill.
Step 3
Heat ¾ cup (150 g) granulated sugar and ¼ cup water in a medium saucepan over medium, swirling pan if needed (do not stir) until sugar is dissolved and syrup is boiling, 5–7 minutes. If sugar crystals start to form on sides of pan, brush with a wet pastry brush to dissolve. Continue to cook, swirling occasionally, until caramel darkens to a mahogany color, is very fragrant with subtle wafts of smoke forming, and bubbles begin to quiet slightly, 16–20 minutes more. (Caramel goes from perfectly caramelized to burnt very quickly, so do not look away. It is better to skew over caramelized than under.)
Step 4
Remove caramel from heat and immediately add 4 Tbsp. unsalted butter, cut into pieces (be careful as it will foam vigorously). Using a heatproof rubber spatula, preferably with a long handle, stir vigorously until butter is melted (caramel may look broken or curdled at this point). Add ½ cup sweetened condensed milk and ¾ tsp. Diamond Crystal or ½ tsp. Morton kosher salt and stir until combined and smooth. Pour caramel evenly over cooled shortbread to cover; spread with offset spatula if needed. Let sit 30 minutes.
Step 5
Microwave 4 oz. semisweet or bittersweet chocolate chips and 4 Tbsp. unsalted butter, cut into pieces, in a microwave-safe bowl on high in 15-second bursts, stirring after each, until chocolate is melted, about 30 seconds total. Whisk until smooth and glossy. (Alternatively, heat in a heatproof bowl set over a saucepan of simmering water, do not let bowl touch water, stirring, until melted, then whisk until smooth and glossy.)
Step 6
Pour chocolate over caramel and spread into an even layer. Let sit until slightly set, then sprinkle flaky sea salt on top. Let sit at room temperature at least 4 hours and up to 12 hours (you can also chill 1 hour if you are in a hurry).
Step 7
Cut into 12 large slices to serve. For the cleanest edges, score bars with a thin, sharp knife, cutting through chocolate and caramel, then switch to a serrated knife to gently saw through shortbread using very little pressure.