Add the eggs and unsalted butter to a saucepan and whisk until combined.
Gradually add the coconut milk.
Add the granulated sugar, all-purpose flour, and salt. Whisk until well combined.
Cook over medium heat, stirring continuously, until the mixture thickens into a smooth custard, then stir in the vanilla extract and shredded coconut.
Pour the coconut filling into the baked and cooled pie crust and spread it evenly. Refrigerate for 4 hours, or until the filling is completely set.
Add the heavy whipping cream, powdered sugar, and vanilla extract to a mixing bowl. Whip until stiff peaks form.
Spread the whipped cream evenly over the chilled coconut filling.
Sprinkle toasted coconut flakes over the top for garnish.
Refrigerate for 15 minutes before serving.
Cut into slices and serve chilled.