If you are working flexibly, i.e. not holding a full time position anymore, then it stands to reason that they would have to hire another person to fill the gap. They would not be allowed to force you to leave without a reason and then advertise your job. But if you know that you’re going to be moving elsewhere, they know that they have a position that needs to be filled, and therefore needs to be advertised.