Pre-bake the pie crust: Place the pie crust in a pie dish, prick the bottom with a fork, cover with parchment paper, and fill with pie weights or dry beans. Bake at 375°F (190°C) for 15 minutes until lightly golden. Remove weights and parchment, then let cool.
Combine coconut milk, sugar, and cornstarch in a saucepan over medium heat. Whisk continuously until the mixture begins to thicken and just starts to simmer, about 5-7 minutes. The filling should be smooth and glossy with visible steam.
Temper the egg yolks: Slowly add a few spoonfuls of the hot mixture into the beaten egg yolks, whisking constantly to prevent curdling. Then, pour the tempered yolks back into the saucepan. Continue to cook, whisking constantly, until the filling thickens further and coats the back of a spoon, about 2 minutes. Remove from heat and stir in vanilla extract.
Pour the hot custard filling into the pre-baked pie crust, smoothing the top with a spatula. Cover with plastic wrap directly on the surface to prevent a skin and chill in the refrigerator for at least 2 hours until set.
Once chilled, prepare the whipped cream: Beat heavy cream and powdered sugar with a mixer until stiff peaks form. Spread or pipe the whipped cream evenly over the set filling. Toast the shredded coconut in a dry skillet until golden brown, then sprinkle on top for a toasted coconut layer.
Slice the pie and serve chilled, revealing the creamy filling topped with golden toasted coconut and fluffy whipped cream for an appealing presentation.