Prep the pan and oven. Heat the oven to 350°F (175°C). Grease a 9x13-inch baking pan and line the bottom with parchment for easy removal.
Mix the dry ingredients. In a large bowl, whisk flour, sugar, baking soda, and salt until evenly combined. This helps prevent clumps later.
Add the wet ingredients. Stir in the eggs and vanilla.
Add the entire can of crushed pineapple with its juice. Mix until no dry patches remain.
Fold in coconut and nuts. Gently fold in the shredded coconut and pecans or walnuts if you’re using them. The batter will be thick but glossy.
Bake the cake. Pour into the prepared pan and smooth the top.
Bake for 30–35 minutes, or until the center springs back and a toothpick comes out clean.
Cool completely. Set the pan on a rack and let the cake cool fully. A warm cake will melt the topping, so don’t rush this step.
Make the topping. Beat softened cream cheese with powdered sugar and vanilla until smooth and fluffy. Fold in the whipped topping until fully combined and airy.
Frost and finish. Spread the topping over the cooled cake.
Sprinkle toasted coconut on top. Add berries if you want a festive look.
Chill before serving. Refrigerate for at least 1 hour to set the topping and blend flavors. Slice into squares and serve cold or slightly chilled.