In the bowl of a stand mixer fitted with the paddle attachment, beat the butter, icing sugar, and salt on medium–low speed until light and well mixed, about 2-3 minutes.
Mix in the vanilla until combined.
Sift in the flour and cornstarch. Mix on low speed until just incorporated.
Gather and form a dough. Shape it into a disk, wrap tightly with plastic wrap and refrigerate 30 minutes or until firm.
Preheat oven to 325 ºF (165 °C). Line two large half-sheet pans with parchment paper (I love the big Nordic Ware cookie sheets that you can get on Amazon).
On a lightly floured surface, roll out the dough to ¼-inch thickness. Cut out circles with 2-inch cookie cutter. Re-roll scraps to cut out as many circles as possible. You should get about 40 circles. If the dough gets too warm, chill it again to firm it up before rerolling, otherwise it may be too soft and sticky.
Place cookies on prepared cookie sheets, spacing them out. Chill them in the fridge for 15 minutes before baking until they are very firm
Bake 15 to 18 minutes. Let the edges brown just a touch. Not too much! Let cool completely before filling.
How to assemble alfajores cookies with dulce de leche
Transfer the dulce de leche to a piping bag. Cut a wide opening, about ½ inch diameter. (Alternatively, you can fit the piping bag with a 12 mm or ½ inch tip, if you prefer, but that isn't necessary!)
Pipe a couple of teaspoons of dulce de leche on the bottom side of half of the cookies. Top each with another cookie to sandwich them together. You may twist the top and bottom cookie in opposite directions to help spread the filling to the edges.
Place the shredded coconut in a shallow wide bowl and roll the edges of the cookies in it, pressing the coconut in place.
Store in the refrigerator for up to 2 weeks in an air-tight container.
Notes
Recipe makes approximately 40 cookies, but if you sandwich them together with a filling, that would make roughly 20 sandwich cookies once assembled.
You may need more or less dulce de leche, depending on how much you pipe onto each cookie before closing. I tried to put roughly 10-15 mL (2–3 teaspoons) per cookie, so I used about 250 mL (1 cup)
If you follow this dulce de leche recipe, made without condensed milk, you will have plenty to fill all the cookies in this recipe, plus you will have some leftover to spread on your morning toast!