In a Dutch oven, add olive oil and cook sliced onions on medium heat for 15-20 minutes.
Reduce the heat to low and let it cook, stirring constantly until the onions reach a deep rich brown color or are caramelized.
Add the flour and cook for 1-2 minutes, enough to remove the raw flour taste.
Stir in the wine while scraping the bottom of the pan to remove browned bits.
Throw in the bay leaves, garlic, and thyme, and give it a quick stir.
Add beef stock, and bring to a boil. Then simmer for another 10-15 minutes uncovered—season with salt and pepper. Adjust to taste and take out the bay leaves.
While your onion soup is simmering, preheat your oven to 400℉ (205℃).
You should have about 2½ cups of onion soup.
To an 8"x8" baking dish, add the rice and 2½ cups of onion soup and stir well.
Top with cubed butter, then cover with foil and bake for 30 minutes.
Remove foil, fluff to evenly distribute the rice and bake for another 30 minutes.
Enjoy your stick of butter rice on its own or as a side to your favorite veggies or proteins.