Add half the butter to the skillet. Add the onion and salt and cook, stirring occasionally to scrape up the browned bits in the pan, until the onions are softened, 4 to 5 minutes. Add more butter, the button mushrooms, and the thyme and cook, stirring occasionally scraping up any browned bits, until the mushrooms have released some liquid and are starting to crisp up, 5 to 6 minutes. Stir in the garlic and cook until fragrant, about 1 minute. Pour in the vinegar and bring to a boil. Reduce the heat to medium and simmer until evaporated, about 5 minutes.