Pat beef cubes dry with paper towels, then toss with flour, salt, and pepper to coat evenly.
Heat 2 tablespoons olive oil in a Dutch oven over medium-high heat. Working in batches, sear beef on all sides until deeply browned, about 3 minutes per side. Transfer to a plate and set aside.
Reduce heat to medium and add butter to the pot. Once melted, add sliced onions and sugar. Cook for 35-45 minutes, stirring occasionally, until onions are soft, jammy, and deep golden brown.
Push onions to one side, add garlic and tomato paste to the cleared space, and cook for 1 minute until fragrant.
Pour in dry sherry to deglaze the pot, scraping up browned bits. Simmer for 2 minutes to cook off alcohol.
Stir in beef bone broth, Worcestershire sauce, and beef bouillon paste until combined.
Return seared beef and accumulated juices to the pot. Add thyme sprigs and bay leaves. Bring to a boil, then reduce to low and simmer covered for 2 to 2½ hours until beef is fork-tender. Discard thyme and bay leaves.
About 15 minutes before stew is done, arrange baguette slices on a baking sheet and broil 1-2 minutes per side until lightly golden.
Ladle hot stew into oven-safe crocks, filling about three-quarters full. Top each with 1-2 toasted baguette slices and a generous handful of grated Gruyere.
Place crocks on a baking sheet and broil for 2-3 minutes until cheese is melted, bubbly, and browned in spots. Let cool slightly before serving.