Make sure your pie crust is fully baked and completely cooled before starting the filling.
In a medium saucepan, whisk together the sugar, cornstarch, and salt. Slowly whisk in the coconut milk until smooth.
Place the saucepan over medium heat and cook, stirring constantly, until the mixture thickens and just begins to bubble. Remove from heat.
In a separate bowl, lightly whisk the egg yolks. Slowly pour about half of the hot coconut mixture into the yolks while whisking constantly.
Pour the tempered egg mixture back into the saucepan. Return to medium heat and cook, stirring constantly, until gently bubbling and thick.
Remove from heat and stir in the vanilla extract. Transfer the custard to a bowl and let cool completely.
Once cooled, whisk the softened cream cheese into the custard until smooth and fully incorporated.
Fold the chopped pineapple into the custard mixture.
In a separate bowl, whip the heavy cream with powdered sugar until stiff peaks form.
Gently fold half of the whipped cream into the coconut custard to lighten it.
Spread the filling evenly into the cooled pie crust.
Top with the remaining whipped cream, spreading gently.
Sprinkle generously with toasted coconut.
Refrigerate for 3 to 4 hours until fully set before slicing and serving.