Preheat the oven to 400 degrees F.
Melt the butter in a large skillet over medium-high heat. Add the onions, season with salt and pepper, to taste, and saute until just brown, about 10 minutes. Add 1/2 cup of water and cook stirring often, until dark golden brown, about 15 minutes. Let the mixture cool to room temperature.
Roll each sheet of pastry to a 12-inch square on a marble surface or parchment paper to prevent sticking. Divide the caramelized onions in the center of each pastry. Put a brie round on top of the onions and brush edges of both pastry squares with beaten egg. Fold pastry up and over cheese to completely enclose the cheese in the pastry. Press the seams together to completely seal. Arrange each pastry round, seam side down, on a silicone mat or parchment lined baking sheet. Brush the top of each pastry round with beaten egg. Bake until golden brown. 20 to 25 minutes. Let stand 15 to 20 minutes before indulging. Enjoy!