And it's good that they're giving them time to transition internally instead of just laying them off. Now the hiring freeze makes more sense, if a team elsewhere is desperate to find an engineer, this is their chance.
It doesn't work like this. If there is a hiring freeze in place, it means that internal headcounts are also limited. The "desperate team elsewhere" must have money to pay for the new engineer.