Preheat the oven to 350 F. Grease and line the bottoms of two 9-inch round cake pans with parchment paper. Whisk together the gluten free 1-to-1 baking flour, baking powder, and salt in a medium bowl.
In a large bowl, beat the softened butter and granulated sugar on medium-high speed for about 3 minutes until very light and fluffy. Add the eggs one at a time, beating well after each. Mix in the vanilla extract and coconut extract.
Add the flour mixture in three additions, alternating with the coconut milk, beginning and ending with the flour. Mix on low speed after each addition just until combined. Divide the batter evenly between the prepared pans.
Bake for 28 to 32 minutes until a toothpick inserted in the center comes out clean. Let cool in the pans for 10 minutes, then invert onto wire racks and cool completely.
For the frosting, beat the softened butter on medium speed until smooth. Gradually add the powdered sugar, beating on low speed. Add the heavy cream and coconut extract and beat on medium-high for about 2 minutes until fluffy.
Place one cake layer on a serving plate. Spread a generous layer of frosting on top. Place the second layer on top and frost the top and sides with the remaining frosting. Press the shredded coconut all over the top and sides of the cake. Refrigerate for 30 minutes before slicing.