Heat the oven to 180°C/350°F (160°C fan-forced). Grease and line a 20cm/8-inch square pan.
Whisk flour, coconut, baking powder, and salt in a bowl.
Beat softened butter and sugar until smooth and fluffy, about 2 minutes.
Beat in eggs one at a time, then add vanilla, lemon zest, and lemon juice.
Mix in one-third of the flour, half the milk, another third of flour, remaining milk, and final flour. Finish with a spatula; do not overmix.
Spread batter in the pan and bake for about 30 minutes, until a toothpick comes out clean.
Cool 5 minutes in the pan, then turn onto a rack and cool completely.
Smear icing sugar with lemon juice into a thick spreadable icing. Cover the cake, sprinkle with coconut, set 1 hour, and cut into bars.