The question depends entirely on how the Japanese would react to the unprecedented situation of being on the losing side, holding some of the enemy's territory and having a fully intact military. Japan, being nationalistic and fearful of showing weakness, did not intend to give up its gains easily though it did do so if pressed, as was the case earlier in China, when it caved to threats from a coalition of France, Germany and Russia and later in Russia, when it eventually withdrew from occupying Eastern Siberia and later, the northern half of Sakhalin as well.
Germany theoretically had the ability to put serious military pressure on Japan if Britain agreed not to intervene on its behalf even at the end of hostilities and would probably be able to dispatch a fleet capable of defeating the IJN fairly confidently if it wished to do so. It is very difficult to know how strongly the Germans would have pushed to recover their pacific territories after having fought a long war. Despite their naval superiority, such an operation might be seen a necessary risk and the Germans would be well within their rights to wage this war. I have my doubts that they would but then again, the Kaiser was big on his empire. If Germany gets back other lost territories, it will threaten the Japanese at first and later, when it has somewhat recovered and if its demands aren't met will probably actually follow up on them. If the peace deal results in a loss of colonies, particularly in Africa, Germany would probably just sell the islands to Japan and hope to get their Tsingtao base back.