Preheat the oven to 200C/400F.
Grease a baking dish with coconut oil. I used a ~9 x 5in Pyrex dish.
In a medium saucepan, bring the coconut milk, garlic, salt, nutmeg, thyme and pepper to a boil. Turn off the heat and set aside.
Scrub the potatoes very well, then slice them thinly using a mandoline or a knife and cover the slices with cold water in a large bowl. Set aside.
Melt the coconut oil in a medium saucepan over medium heat. Whisk in the flour until incorporated and cook the mixture, whisking until it thickens.
Slowly pour the coconut milk mixture. Continue whisking, then bring to a boil and remove from heat.
Layer ⅓ of the potatoes slices on bottom of the baking dish, pour 1/3 of the coconut sauce over them and sprinkle with 1 cup of grated vegan cheese.
Layer the remaining potato slices and cover them with tofu crumbles and 1/3 of the coconut sauce.
Cover with foil and bake for 45 minutes. Remove the foil and sprinkle with the rest of the vegan cheese. Bake uncovered for 15-20 more minutes until golden on top.