How to prevent sweet thick glaze/sauce from setting after cooling?
until the syrup coated the back of a spoon 


Then you made syrup, and that's why it had the texture of syrup. You should not have cooked it, just warmed until it dissolved, if you wanted a sauce texture. 

If the directions in the recipe are for cooking until it gets so thick, then the recipe intends the sticky texture, and you might want to use a different recipe. Or maybe they intended the thinnest possible syrup at say 102 C boiling point, and you misunderstood the vague suggestion of "coat the back of the spoon" and let it climb up to maybe 106 or 108. 

In candymaking, the ratio of the sugar to liquid is not important, because you just boil the mixture until enough liquid has evaporated to get to the right stopping point (the one which corresponds to the desired texture after setting). It only has an influence on the time of preparation, not on the final result. If you would prefer a dissolved version (not heated until you get a syrup), then the ratio becomes important.