Set Instant Pot on Saute / More. Melt butter.Add onions, garlic, bay leaves, thyme, salt and pepper and cook until the onions are slightly softened and start to release liquid, about 5 minutes.Seal Instant Pot lid and set to Manual / High Pressure / 20 minutes. Quick Release (QR) and remove lid.Set Instant pot to Saute / More and continue cooking with lid off, stirring occasionally, until the liquid has reduced.Add the wine, bring to a boil.Set Instant Pot to Saute / Less and simmer until the wine has evaporated and the onions are almost dry. Stir occasionally.Discard the bay leaves and thyme sprigs. Add the flour and stir into the onions. Keeping the heat on Saute / Less, cook, stirring frequently, for 10 minutes to cook out the raw flour taste.Add om the beef broth. Turn Instant Pot back up to Saute / More and cook for 10 minutes. Taste and season with salt and pepper if desired.Add 2 tablespoons of Gruyere cheese to the bottom of your bowl and ladle in soup. Top with a sprinkle of cheese. Enjoy!