Evolution of the coherence of vibrational states in a gradual disorder-order phase transition