This sort of situation has led to the exact opposite - territory which both two countries claim doesn't belong to them: https://en.m.wikipedia.org/wiki/Bir_Tawil
This is because both Sudan and Egypt claim a slightly nicer parcel of land by the coast, and presumably taking Bir Tawil results in ceding the claim on the other part. It all came about due to slight ambiguities chopping up the old British Empire colonies in Africa.