You need to wait until your baked good is completely cool, otherwise the icing will melt into it. If you are finding that your glaze is soaking in much more than you would like, add a little butter to the glaze. The extra fat will help hold the glaze together to form a layer.