Arrange a rack in the middle of the oven and heat the oven to 350°F. Coat a 9x13-inch baking pan with butter or oil. Melt 1 stick unsalted butter in the microwave or on the stovetop.
Place 1 pound mochiko, 2 cups granulated sugar, 2 teaspoons baking powder, and ½ teaspoon kosher salt in a large bowl and whisk to combine. Place 2 cups milk, 4 large eggs, and 2 teaspoons vanilla extract in a medium bowl and whisk to combine.
Pour the wet ingredients into the dry ingredients and, with a wooden spoon, stir until well combined. Add the melted butter and 1 can coconut milk and mix until fully incorporated and smooth.
Pour the mixture into the prepared pan and rap the pan on the counter a couple of times to bring any air bubbles up to the surface.
Evenly sprinkle ½ cup shredded coconut on top of the mixture, a handful at a time, being careful not to jiggle the pan too much, as you want the coconut to stay on the top. Then sprinkle on a few pinches of flaky salt, if desired.
Bake until the mochi is set and golden brown on top, 60 to 70 minutes.
Set the pan on a wire rack and let cool completely, about 1 hour. Slice into rectangles, using a plastic knife to minimize sticking; I cut four columns and five rows to make twenty 2 ¼ by 2 ½-inch pieces. If the knife seems to be sticking, rub it with a little unsalted butter or neutral oil.