It seems to be the stress of the change of diet. It happens on other diets, too.
You can help reverse the hair loss by eating to satisfy your hunger (in other words, don’t intentionally restrict how much you eat; let your appetite guide you). Hair growth is one of the processes that gets slowed or halted when energy intake drops, and it restarts once energy intake can support it again. People eating a ketogenic diet to satiety often find that their hair growth is more luxuiant. Of course, there is a lot of individual variability in these matters, so your mileage (kilometrage?) is guaranteed to vary.