Preheat the oven to 350ºF (180ºC). Line two 8-inch (20-cm) round cake pans with parchment paper. Lightly grease with baking spray with flour.
Sift the flour, baking powder, baking soda, and salt together into a large bowl.
In a mixing bowl or liquid measuring cup, combine the coconut milk and vinegar. Set aside.
Using an electric hand mixer or a stand mixer, beat the butter on medium-high speed until creamy, 3 to 4 minutes. Add the sugar and beat on high speed for 4 minutes, until creamed and pale, scraping down the sides and up the bottom of the bowl with a rubber spatula as needed. Then add the yogurt, coconut extract, and vanilla; continue beating to combine, about 1 minute.
Turn the mixer to low and add the flour mixture in three batches, alternating with the coconut milk mixture, beginning and ending with the flour mixture. Beat until just combined, 30 to 45 seconds. Do not overmix. Fold in the unsweetened shredded coconut.
Evenly divide the batter between the prepared pans.
Bake for 30 to 40 minutes, or until a toothpick inserted in the center comes out clean. Let the cakes cool in their pans on wire racks for 10 minutes, then remove from the pans. Allow the cakes to cool completely, right-side up, on wire racks before removing the parchment paper.