Preheat the oven to 350°F (175°C) and line two baking sheets with parchment paper.
In a medium bowl, whisk together the flour, baking soda, and salt.
In a large bowl, beat the softened butter, granulated sugar, and brown sugar until light and fluffy.
Add the egg, vanilla extract, and almond extract (if using), and mix until fully combined.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Fold in the white chocolate chips.
Gently fold in the raspberries, being careful not to overmix or crush them too much.
Scoop about 2 tablespoons of dough onto the prepared baking sheets, spacing the cookies about 2 inches apart.
Bake for 10–12 minutes, or until the edges are lightly golden and the centers are still soft.
Let the cookies cool on the baking sheet for 5 minutes, then transfer to a wire rack to cool completely.
If desired, drizzle with melted white chocolate and sprinkle with flaky sea salt before serving.