Make the Coconut Cream Filling:
In a medium saucepan, whisk together the granulated sugar and cornstarch until well combined. This helps prevent lumps from forming when you add the liquid.
In a separate bowl, whisk together the whole milk, coconut milk, and egg yolks until smooth.
Gradually pour the milk mixture into the sugar and cornstarch mixture, whisking constantly to ensure no lumps form.
Place the saucepan over medium heat and cook, stirring constantly with a whisk or spatula, until the mixture thickens and begins to bubble. This should take about 5-7 minutes. Be patient and keep stirring to prevent scorching.
Once the mixture has thickened, remove the saucepan from the heat and stir in the butter and vanilla extract until they are fully incorporated. The butter will add richness and the vanilla will enhance the flavor.
Assemble the Pie: