Set your Instant Pot to Sauté mode. Add butter and olive oil, then add the sliced onions, sugar, and salt. Cook for 15-20 minutes, stirring occasionally, until onions are deeply golden and caramelized.
Add the minced garlic and cook for another minute until fragrant.
Pour in the white wine and scrape up any browned bits from the bottom of the pot. Let it simmer for 2-3 minutes.
Add the beef broth, bay leaves, thyme, and black pepper. Stir to combine.
Close the lid and set the valve to Sealing. Cook on High Pressure for 10 minutes.
When cooking is complete, allow for a natural release for 10 minutes, then quick release any remaining pressure.
Remove bay leaves and taste for seasoning. Ladle soup into oven-safe bowls, top with toasted bread and Gruyère cheese. Broil for 2-3 minutes until cheese is melted and bubbly.