I've posted several times before about my brain fog which was caused by a (not to my choice!) high carb diet well before I was diagnosed with T2. As soon as I cut back down on the carbs after diagnosis it cleared.
Re ketosis vs fat adapted: I'd always eaten normal full fat food for 70+ years, so my body was already well used to dual fuel mode burning fats as well as carbs for fuel. But I'd agree that going from a long term high carb diet to a low carb one could result in a lack of (brain) fuel while a body (re)learned how to use fat as extra fuel to replace an often drastic reduction in carbs
However, having got to basic grips with our T2 fuel mechanics system, I don't really understand why my brain fog, except perhaps scoffing all those additional carbs meant I wasn't ever needing to use the fat I still ate and presumably it was just getting stored away for some possible future eventuality....