Heat butter in a saucepan over medium heat.
Add diced onions and sauté until translucent.
Stir in minced garlic and cook until fragrant.
Add sliced mushrooms and cook until they release moisture.
Sprinkle flour over the mixture and stir to combine.
Gradually pour in vegetable broth, whisking to avoid lumps.
Stir in soy sauce and thyme for added flavor.
Allow the mixture to simmer, stirring occasionally.
Season with salt and pepper to taste.
Cook until thickened, about 5-7 minutes.