Text this: Magnetic field optimization for long-lived entanglement in quantum spin systems