Borders have been redrawn for centuries on Earth, and yes sometimes a group of people are affected by it.
So place yourself as the Federation President, would you not sign a treaty and risk a war that could potnetially cost tens of thousands of lives or a agree to a few worlds swapping ownershp and relocating those citizens.
Which is more important those worlds of the lives of thousands?
I think many would say preserving life is more important. Remember the Federation wasn't abandoning these people it offered them relocation.