Arrange a rack in the middle of the oven and heat to 175C/350F. Coat a 9×13" pan with butter or oil. Melt the butter.
Whisk together the mochiko, sugar, baking powder and kosher salt in a large bowl. In a separate bowl whisk together the milk, eggs and vanilla.
Pour the wet ingredients into the dry and stir with a wooden spoon until well combined. Add the melted butter and coconut milk and mix until smooth.
Pour into the prepared pan and rap on the counter a couple of times to bring air bubbles to the surface.
Evenly sprinkle the shredded coconut on top, being careful not to jiggle the pan. Sprinkle over flaky salt if desired.
Bake until set and golden brown on top, 60-70 minutes.
Cool completely on a wire rack, about 1 hour. Slice into rectangles using a plastic knife to minimise sticking (4 columns × 5 rows = 20 pieces). Rub the knife with butter or oil if it sticks.