In a medium saucepan, combine the coconut milk, whole milk, and shredded coconut. Warm over medium-high heat, bringing it to a gentle simmer.
While the milk mixture heats, whisk the sugar, salt, egg yolks, and cornstarch together in a large bowl until smooth. Once the milk mixture begins to simmer, gradually ladle about a cup of it into the egg mixture, whisking continuously to temper the eggs and prevent curdling. Repeat with another cup of the warm milk.
Return the tempered egg mixture to the saucepan with the remaining milk, and continue to cook over medium heat. Stir constantly, alternating between a whisk and a spatula to ensure the custard thickens evenly without scorching. After 3–5 minutes, the filling should be bubbling and noticeably thick. Remove it from the heat, and stir in the vanilla extract and butter until smooth and creamy.
Let the filling cool to room temperature before pouring it into the prepared crust. Cover the pie and refrigerate until completely set and chilled, which will take several hours.