Toast the coconut: Preheat the oven to 325°F (163°C). Spread 1 1/2 cups unsweetened shredded coconut on a baking sheet.
Bake 4–7 minutes, stirring once, until golden in spots and fragrant. Watch closely—coconut burns fast. Set aside to cool.
Measure out 1 cup for the filling and 1/2 cup for topping.
Make the crust: In a bowl, mix almond flour, coconut flour, sweetener, and salt. Stir in melted butter and vanilla until the mixture resembles damp sand and holds together when pressed. Press firmly into a 9-inch pie plate, going up the sides evenly.
Par-bake the crust: Bake at 325°F for 12–15 minutes until lightly golden at the edges.
Cool completely on a rack. The crust will firm as it cools.
Bloom the gelatin: In a small bowl, sprinkle gelatin over 2 tablespoons cold water. Let stand 5 minutes.
Start the custard: In a saucepan, whisk coconut milk, heavy cream, sweetener, and a pinch of salt.
Heat over medium until steaming, not boiling. If using xanthan gum, sprinkle lightly and whisk vigorously to avoid clumps.
Temper the yolks: In a separate bowl, whisk egg yolks. Slowly pour in about 1/2 cup of the hot cream mixture while whisking constantly.
Return the yolk mixture to the saucepan, whisking as you go.
Thicken the filling: Cook over medium-low heat, stirring constantly with a silicone spatula, until the mixture coats the back of the spatula and reaches about 170–175°F. Do not boil. Remove from heat.
Melt in gelatin and flavor: Whisk the bloomed gelatin into the hot custard until dissolved.
Stir in vanilla and coconut extract. Fold in 1 cup toasted coconut.
Cool slightly: Let the filling sit 10–15 minutes, stirring a couple of times to release steam. This helps prevent a soggy crust.
Fill the crust: Pour the warm filling into the cooled crust.
Smooth the top. Cover loosely with plastic wrap, touching the surface to prevent a skin.
Chill to set: Refrigerate at least 4 hours, preferably overnight, until firm and sliceable.
Whip the topping: Beat the cold heavy cream, sweetener, and vanilla to soft peaks. Spread or pipe over the chilled pie.
Finish and serve: Sprinkle with the remaining 1/2 cup toasted coconut.
Slice with a sharp knife wiped clean between cuts. Enjoy cold.