Coherent phase transfer for real-world twin-field quantum key distribution