Shell-driven magnetic stability in core-shell nanoparticles