Quantum robustness and phase transitions of the 3D toric code in a field