Properly melting butter and sugar together for butterscotch bar recipe
In the past I have had a similar issue with making a butterscotch drink recipe.  What I have found is that adding a bit of water to the melted butter (1-2 tsp/1/2 c, 5-10mL/120mL) helps dissolve the brown sugar and prevents graininess and seizing.  Sugar is not readily soluble in fat, so it needs water in order to dissolve.

I suspect one of three things happened:


Different batches of butter may have different water contents.
The brown sugar may have lost some of its moisture as it sat around in the
pantry.
Some of the water may have evaporated off while melting the butter.


If you heat brown sugar in butter without enough water some will dissolve in the water present from the butter and the brown sugar, but it will become grainy and seize as the water is evaporated and the undissolved sugar granules act as nucleation sites.  Meanwhile the undissolved sugars are being lightly fried in the fat from the butter.