Position an oven rack in the center of the oven and preheat to 350 degrees F. Line a baking sheet with parchment.
Combine the butter and sugar in a stand mixer fitted with the paddle attachment. Beat on low speed then gradually increase the speed to medium, until lightly and fluffy, 2 to 3 minutes. Scrape down the sides of the bowl.
With the machine running on medium speed, add the eggs, one at a time, and beat until thoroughly combined after each addition. Scrape down the sides of the bowl, as necessary. Add the vanilla and almond extracts.
Slowly add in the flour and salt with the machine running on low speed and mix until the dough comes together and no streaks of flour remain, about 1 minute. Add the coconut and mix on low speed just until combined, about 30 seconds.
Fold in the raspberries with a silicone or rubber spatula. They will begin to break but try not to overwork the dough to keep them intact as much as possible.
Scoop the dough with a medium (2-inch) ice cream scoop, flattening the dough against the bowl, and place 6 scoops at least 1 inch apart on the prepared baking sheet.
Bake 1 sheet of cookies at a time for 6 minutes then rotate the sheet and continue baking until the bottoms of the cookies are golden brown and the tops have set, 4 to 6 minutes. Remove from the oven and transfer to a wire rack to cool completely. Repeat with the remaining dough.
Serve or store in an airtight container for up to 4 days.