Text this: Practical security of twin-field quantum key distribution with optical phase-locked loop under wavelength-switching attack