Symmetry breaking and restoration of symmetric solitons in partially parity-time-symmetric potentials