Cream the butter in a mixer fitted with a paddle attachment (or using a hand mixer) until soft and fluffy. Add the egg yolks and vanilla and mix well.
Mix the granulated sugar, flour, baking powder, and salt together. Add to the butter and egg yolk mixture and mix just until incorporated and the dough starts to come together. Turn the dough out onto a floured work surface and form into two balls. Wrap each ball in plastic wrap and freeze at least 2 hours or overnight (or as long as a month, if you like).
Heat the oven to 350 degrees. Lightly grease a 8x8 or 9x9 square baking pan or a 10-inch tart pan with removable bottom. (I use Baker's Joy spray).
Remove one ball of dough from the freezer and coarsely grate it by hand or with the grating disk in a food processor into the bottom of the greased baking pan (or tart pan). Make sure the surface is covered evenly with shreds of dough.
Gently mix the blueberries, raspberries and the lemon juice in a medium bowl. Mix sugar, flour, lemon zest in a small bowl until combined, then add to blueberry/raspberry mixture and mix gently with your hand to coat the berries with the flour mixture.
Cover the bottom layer of dough with the blueberry mixture as evenly as possible, gently pressing the berries into the dough. Remove the remaining dough from the freezer and coarsely grate it over the entire surface. (I grate this second ball of dough onto a piece of plastic wrap, then sprinkle over the berries.).
Place in oven and cover lightly with foil, bake for 20 minutes, then remove foil. Continue baking until lightly golden brown and the center no longer wiggles, about 20-30 minutes longer. Remove from oven and allow to cool.
After the shortbread is cooled, sprinkle with powdered sugar, if desired or drizzle with lemon glaze. For lemon glaze, mix 1/2 cup powdered sugar with 1 tablespoon lemon juice. Add enough milk, 1 teaspoon at a time, to thin out to thick drizzling consistency.
Cool on a wire rack, then cut in the pan with a serrated knife. Chilling the pan in the fridge makes it a lot easier to get clean cuts.
Adapted from Butter Sugar Flour Eggs.