Melt butter in a large, heavy saucepan over medium heat. Add mushrooms, onion, and garlic; cook and stir until tender, about 10 minutes. Add salt, pepper, and thyme; cook and stir until combined, about 1 minute. Stir in chicken broth, heavy cream, and cream cheese. Reduce heat to a low simmer and pour in sherry. Cook, stirring constantly, until flavors are well incorporated, about 45 minutes.