Welcome to Healthcare Magic
It could be recurrent folliculosis. You may need to avoid putting on any cap on her head as this predisposis to infections. Kindly pat dry her scalp
whenever she sweats. It may also be associated with seborrheic dermatitis
where superficial skin infections are common. As of now just keep her scalp dry and follow on the medication the Doctor has advised. As her immunity develops it should clear away.