In a large skillet, heat the butter over medium heat. Add the thinly sliced onions and cook, stirring occasionally, for about 20-25 minutes until they are deeply caramelized. If the onions start to stick, add a splash of water or beef broth.
Add the minced garlic, sugar, and balsamic vinegar, and cook for another 2-3 minutes.
Pour in the white wine and beef broth. Let it simmer for about 5 minutes until half of the liquid is absorbed. Season with salt and pepper.
Preheat your oven to 375°F. Remove the onion mixture from the skillet and set aside.
Season the chicken breasts with salt and pepper on both sides.
Using the same skillet on medium-high heat, add the olive oil and sear the chicken breasts until golden brown on each side. 2-3minutes per side is all you need. Remove from heat.
Spread the caramelized onions evenly over the seared chicken breasts.
Sprinkle the shredded Gruyère and mozzarella cheese evenly over the onions and chicken.
Transfer the oven-safe skillet or baking dish to the preheated oven and bake for 20-25 minutes, until the chicken is cooked through (internal temperature of 165°F) and the cheese is melted and bubbly.
Remove from the oven and garnish with fresh chopped parsley.