Both men and women will switch jobs for higher pay—but what it takes to keep them is different for each group