Line an 8x8-inch metal baking pan with parchment paper and lightly grease the parchment and sides.
Toast the shredded coconut in a dry skillet over medium-low heat for 5-7 minutes, stirring constantly, until golden brown and fragrant. Let cool completely, then finely chop.
In a heavy-bottom saucepan, combine the butter, brown sugar, granulated sugar, corn syrup, sweetened condensed milk, heavy cream, and salt.
Cook over medium-low to medium heat while stirring constantly with a silicone spatula until the mixture is smooth and fully combined.
Continue cooking and stirring until the caramel reaches exactly 245°F on a candy thermometer. The caramel should be thick, glossy, and medium caramel brown.
Immediately remove from heat and stir in the vanilla extract, coconut extract, and toasted coconut until evenly combined.
Pour the caramel into the prepared pan and smooth the top.
If desired, sprinkle lightly with flaky sea salt.
Let the caramel cool completely at room temperature for 4-6 hours or overnight.
Lift the caramel from the pan using the parchment paper and cut into squares with a lightly greased sharp knife.
Wrap individual caramels in wax paper if desired.