
Preheat oven to 350℉ (175℃).
Spread the coconut on a baking sheet and bake it, stirring occasionally, until golden brown, about 5 minutes. Bake, stirring constantly, for 2 minutes more.
In a medium saucepan, combine the cornstarch, sugar, salt, coconut milk, whole milk, and egg yolks and whisk until thoroughly combined over low heat. Whisk thoroughly to avoid clumping.
Bring to a boil and keep stirring for 2-3 minutes more. Stir in butter and mix thoroughly. Remove the saucepan from heat (the mixture should have thickened).
Stir in the vanilla extract and toasted coconut flakes (reserving a couple of tablespoons for decorating if desired), and pour the filling into the prebaked pie shell. Chill until firm, about 4 hours.
Top with whipped topping and sprinkle with the reserved coconut flakes.