Preheat your oven to 325°F (165°C). Spread the shredded coconut in an even layer on a rimmed baking sheet.
Toast the coconut for 8-10 minutes, stirring every 2-3 minutes, until it turns golden brown and fragrant. Watch closely in the final minutes to prevent burning. Let cool completely.
Line a baking sheet with parchment paper or a silicone mat. Set aside.
Place the chopped white chocolate in a microwave-safe bowl. Microwave in 20-second intervals, stirring thoroughly after each burst, until the chocolate is melted and smooth. This usually takes 60-90 seconds total.
Stir the vanilla extract (if using) into the melted chocolate. Fold in about three-quarters of the toasted coconut, reserving the rest for topping.
Pour the chocolate mixture onto the prepared baking sheet and spread it into a rectangle about 1/4 inch thick using an offset spatula or the back of a spoon.
Immediately sprinkle the remaining toasted coconut over the top, pressing it gently into the chocolate. Add a pinch of flaky sea salt if desired.
Let the bark set at room temperature for 1-2 hours until completely firm. Once hardened, break it into irregular pieces by hand or snap it along natural break lines.