To prevent the glaze from melting, let the donuts cool completely before glazing them. You can also refrigerate the donuts for a few minutes before glazing them.