It seems to me as if you refer to substantial weight loss that would clearly change the entire figure of a woman - and not just losing the odd 2-3 kg that almost every woman thinks are too much on her hips.
At the same time I get the feeling that you are not talking about what the average person would already call "long hair" - which is the kind of "long hair" you get to see in public several times a week: armpit length to waist length.
I´m sure that these widespread hair lengths in women can indeed be reached by any generally healthy woman, no matter what quality her nutrition, no matter if she cares about it at all. You even see such lengths of reasonable quality in women with bad eating habits, or even risky, if not dangerous lifestyles, such as drug addicts or alcoholics.
On this forum, we have different standards of "long hair", however; we admire classic length to ankle length, and even beyond floor length in some cases - and I´m absolutely sure that SUCH extraordinary lengths (or above-average growth rates) can only be reached when you stick to a healthy lifestyle.
The replies that you have gotten so far seem to indicate a common error about weight loss. Many people believe that real, substantial, and permanent weight loss has to (and can only) be brought about by malnutrition or insufficent nutrition. The very opposite is true. Being underfed will eventually backfire on you. The goal of real and permanent weightloss can only be achieved if you give the body all it needs, while carefully avoiding the consumption of substances or food ingredients that your body definitely doesn´t need.
The logical conclusion of these very basic facts is that a successful diet will not have a negative effect on the quality and growth of your hair as your body is in fact getting all it needs. Theoretically, a sensible and balanced diet can be expected to improve just about every function and process within your body.