There are a number of possible solutions. Of course, each of them has its problems and there are ways in which each is not particularly realistic.
One somewhat fanciful possibility is for both sides to relinquish claims of control and to have an international body maintain the islands as a marine life sanctuary. Such a solution would prevent either side from having to give in to the other.
Another possibility would be for both sides to agree to take the matter to the International Court of Justice. In disputes over ownership within a country, taking the case to court would be the obvious answer. It might be possible to try this in the international arena and allow the case to be settled legally.
Finally, the two sides could agree to revert to the status quo of a few years ago. For years, this dispute existed between the two sides without causing the sorts of tensions that we now see. It seems as if it would be possible to go back to that situation with each side agreeing to acknowledge the dispute and with each side promising not to do anything to disrupt the situation.
Again, it is not at all clear that any of these things would work, but they are possible solutions.