I have a recipe that calls for melting margarine, adding brown sugar, and boiling a few minutes before pouring it over matzah boards. The problem is that the margarine separates, and the brown sugar never totally dissolves.
I’ve had this problem several times with melting brown sugar and butter together and boiling it. The key is to start on a lower temperature, stirring the brown sugar and butter as it melts. Allow the mixture to slowly get to a boil and then leave it-allow it to boil on its own evaporating some of the liquid. Never do this on high temperature-it wrecks it every time!