Heat oil in a large skillet on medium-high. Add onion and cook, stirring occasionally, until caramelized, for about 4 minutes.
Scoop the onion on one side of the skillet. Add butter to the skillet until melted, add garlic and thyme, and cook until fragrant, about 1 minute.
Add gluten-free flour and yeast flakes and stir cook for another minute but don't brown. Add vegetable broth and stir vigorously until sauce is thick and creamy. Add Bragg's Liquid Aminos and salt to taste.
Preheat oven 425 degrees F. Spray or brush a casserole pan with oil. Spread a layer of potato slices, followed by sauteed onion/fennel, pour half the sauce over them. Add a final layer of potato slices and top with remaining sauce.
Cover casserole pan with parchment paper and or foil and bake for 1 hour in a preheated oven at 425 degrees F. Remove the cover and bake for 15 minutes or until top is golden brown and potatoes are tender.