Pre-bake the pie crust if using a raw crust, then let it cool completely before adding the filling.
In a medium saucepan, combine sugar, cornstarch, and salt. Gradually add milk, whisking to combine.
Cook over medium heat, stirring constantly until the mixture thickens and comes to a gentle boil (about 6-8 minutes).
In a separate bowl, whisk the egg yolks. Slowly add about 1/2 cup of the hot milk mixture to the yolks to temper them, whisking constantly until incorporated.
PoÙur the egg yolk mixture back into the saucepan.
Cook for 2 more minutes, stirring constantly, until the mixture is thick and smooth.
Remove from heat, then stir in shredded coconut, vanilla extract, and butter until well blended.
Pour the filling into the cooled pie crust, smoothing the top with a spatula.
In a large mixing bowl, beat the egg whites and cream of tartar on medium-high speed until soft peaks form.
Gradually add sugar, 1 tablespoon at a time, and continue beating until stiff, glossy peaks form. Add the vanilla extract and beat briefly to incorporate.
Spoon the meringue over the coconut cream filling, spreading it to cover the filling completely and sealing the edges to the crust. Use the back of a spoon to create swirls and peaks.