When you insert the headphones jack into the socket, usually a contact is made which sends a signal to the audio controller to switch the audio away from the speakers and on to the headphones. When you remove the headphone jack the contact is broken and the signal is removed and the audio controller switches it back to the speaker (and removes the symbol on the screen)
The audio controller is obviously still getting the signal even though you have replaced the socket.
Is the headphones symbol still showing if you disconnect the headphone socket flex cable from the connector?
The image in the link below taken from the Ifixit guide for a Sony Xperia T2 (which hopefully has a similar headphone socket setup to yours) shows the socket flex cable being removed from the connector on the pcb.
You should check where the socket flex cable plugs into the connector that there is no short circuit connections between any of the connector pins or where they connect to, on the pcb. Also check that the components in the immediate vicinity around the connector 'look' OK and do not look stressed or are even missing.