Whisk together the frangipane filling ingredients in a medium bowl until fully smooth (or blend together in a food processor).
Line a small baking sheet with parchment paper. Scoop 8 heaping tablespoons of the frangipane filling onto the baking sheet, an inch or so apart. Place in the freezer for about 1 hour (you may also do this ahead and keep the filling scoops in the freezer until ready to use). You will likely have leftover filling to add to something else!
Meanwhile, make your cookie dough. In a large bowl, beat together the room temperature butter with the brown sugar until the mixture is creamy, then beat in the flax egg and vanilla. Gently mix in the flour, baking soda, and salt until a uniform dough is formed. Stir in the chocolate chips, if desired.
Divide the dough into 8 equal-sized mounds on a baking sheet. Divide one of the dough mounds into 2 equal pieces, flatten them like a pancake with your hands, and place a frozen spoonful of filling in the center of one piece. Place the other dough half on top over the filling, pinch the bottom and top edges of the dough together to ensure that the filling is fully and evenly wrapped inside the dough. Gently press the dough into a ball, then press sliced almonds or chocolate chips into the dough. Repeat this process with the remaining dough balls and frozen filling scoops. Refrigerate or freeze the prepared dough balls for a few hours or up to 1 day ahead (you may also freeze them to bake up to 1 month later).
Preheat oven to 375 degrees F. Arrange the cookie dough balls a few inches apart on two large baking sheets lined with parchment paper.
Bake for 14-18 minutes (or a bit longer if baking from frozen), until lightly golden and firm around the edges. Allow to firm up on the pan for 10 minutes, then gently transfer to a wire rack to cool. Dust with powdered sugar, and enjoy!