In a large skillet, melt 2 tablespoons of butter over medium-low heat. Add the onions, red pepper flakes, rosemary, salt, and pepper. Cook slowly for 20–25 minutes until golden brown and soft. Stir in brown sugar and balsamic vinegar and cook another 5–7 minutes until deep and rich in color. Cool slightly, then chop finely and combine with cranberry sauce in a bowl.
Preheat your oven to 350˚F. Using a serrated knife, slice the loaf into a grid pattern—don’t cut all the way through. You want small squares that stay connected at the base.
Carefully stuff the cranberry-onion mixture into the cuts. Add strips of brie and sprinkle shredded cheese evenly. Make sure each layer gets a little of everything for maximum flavor in every bite.
Place the stuffed loaf on a baking sheet. Drizzle the remaining melted butter over the top. Bake for 25–30 minutes until cheese is melty and the bread is golden brown. Let it cool slightly before serving so it holds together but remains gooey.