Heat the butter and avocado oil in a large saucepan over medium-high heat.
Add the onions and thyme and cook, stirring occasionally, for 10 minutes.
Reduce heat to medium and cook for another 30 minutes, until the onions are a deep golden brown.
Stir in the garlic and cook for 1 more minute.
Add the cooking sherry and cook for 2 minutes, scraping up any browned bits.
Add the broth, coconut aminos, salt, pepper, and xanthan gum. Simmer over medium heat for at least 15 minutes.
Preheat a broiler to high and ladle soup into broiler-safe soup crocks. Sprinkle with cheese. Alternatively, you can toast bread, add it to the crocks and top with the cheese.
Broil for 2 minutes, until the cheese is bubbly.