Sift cocoa, flour, and cornstarch into a medium bowl. Whisk to combine completely. Set aside.
In the bowl of a stand mixer fitted with the paddle attachment, cream butter on medium until fluffy, about 1 minute. Add sugar and salt and cream on medium-high until light and fluffy, about 3 to 4 minutes.
Meanwhile, melt chocolate in a small bowl by microwaving in 30-second increments and stirring in between. Let cool for a minute or two.
Add chocolate and vanilla to mixer and mix until incorporated, about 1 minute. Scrape down sides and mix again.
Add flour mixture in two additions, mixing just enough to incorporate between additions, 15 to 20 seconds.
Turn mixture onto a clean work surface, and, using the heel of your hand and a dough scraper, shape into a 5x5 inch square about 1 inch thick. Wrap in plastic and refrigerate for 2 hours.
Preheat oven to 325°F. Arrange oven racks so one is near the bottom and the other is one-third from the top. Line two baking sheets with parchment or silicone baking mats.
Place shortbread dough between two pieces of baking parchment and roll into a 9x9-inch square. Cut into 36 squares, each 1 1/2 inches on a side, and transfer to baking sheets.
Using a stencil design of your choice, dust the tops liberally with confectioners' sugar.
Bake 20 minutes, rotating from top to bottom, and front to back, halfway through.
Cool 5 minutes on baking sheet, transfer to a rack to cool completely.