Prevent brioche buns from spreading during rise
If you had the same problem with different recipes, it's probably caused by technique. The key to round buns is surface tension. If the skin is taut, the expanding gas will cause the bun to expand like a balloon instead of "flowing" sideways.

When shaping your buns, make sure you create tension by either repeatedly folding the outer edge inwards or by using a rotating movement with a cupped hand - the base of your thumb and your pinky press lightly onto the dough ball while swirling it around. Do not use much flour (if any at all), because the dough should stick ever so slightly to the work surface. If you turn the now round bun over, you should ideally see a "spiral" on the bottom and the skin of the bun is pretty tight:



A video incuding slow-motion can be found here, for example.

If you find this too complicated, use your standard "fold under" method and repeat until the skin is taut.