This is a bit OT, but in this hypothetical instance you describe I wouldn't be surprised to see codeshares continue since I assume these routes are not easily flown or easily competed on by rivaling carriers. You see this a bit in Asia where airlines codeshare with each other even through they belong to different alliances. While alliance partners generally receive preference for codesharing agreements, it's not always possible or practical to stick with the alliance for every route.