Entanglement robustness via spatial deformation of identical particle wave functions