Probably one of the things the body deprioritizes during period of no food. There’s no reason it’ll damage hair growth permanently after normal feeding though. I imagine most people probably slow down hair growth during fasting since the body needs energy for other important things.
shedding yes, but hair loss no, shedding can be scary or annoying but it doesn’t mean hair loss, the things that reverse hair loss (like finasteride and minoxidil or however you spell them) have shedding as a side effect
ive also heard the theory that it is an effect of detox, as in your body sheds the bad material in order to invest the energy into detox. i had a phase of hair loss but that stopped after about 3 months or so and never recurred. ive heard if your hair, and especially the scalp, is already healthy then you dont get hair loss, if its unhealthy the detox will mess with it.