I can think of one example. Tamar, the mighty Queen of Kings of Georgia (c. 1160-1213) married as her 2nd Husband David Soslan from Alania (who later sources claimed was also a member of the Bagrationi dynasty, her father's 4th cousin).
Their children included a son named George (1191-1223) and a daughter named Rusudan (c. 1194-1245).
George became King of Kings George IV of Georgia from 1213-1223. He died young and had a young son named David (1215-1270).
George's sister Rusudan became Queen of Kings in 1223. She married Ghis ad-Din, a member of the Muslim Seljuk dynasty. Their Children were David (1225-1293) and Tamar (d. 1286). Fearing that her nephew David would claim the throne, Rusudan had him imprisoned at the court of her son-in-law, Sultan KayKhusraw II, husband of Tamar. Rusudan sent her son David to the court of her overlord the Mongol Great Khan of Khans to be apointed ruler of Georgia. Tamar died while David was away.
David, son of George, was set free in 1242. In 1246 the Georgian nobles, believing that David son of Rusudan had died in 1244, selected David son of George, as the new king of kings, David VII Ulu. David VII Ulu was sent to the court of the Great Khan of Kans for official recognition, and was held there for five years, meeting his cousin David there. They were apointed to rule as joint monarchs. So David son of Rusudan became David VI Narin. And of course the relationships between the joint rulers and their descandants were complicated.
On the other hand, there are many examples in history when someone came to a place and claimed to be a monarch who had supposed died, and wanted to "reclaim" the throne. It seems like every time a monarch died tragically, or dramatically, or mysteriusly, or in a distant location, someone showed up claiming to be him or her.
Such claimants are almost always considered to be imposters by historians, and are usually described as the false person they claimed to be.
Here is a link to a list of false royal heritage claims.
Of course that list is very incomplete.
Some more medieval examples of imposters are listed on page 36 of The Atheist’s Bible: The Most Dangerous Book That Never Existed, Georges Minois, 2012, is the statement that in the period 1300 to 1500:
Impostors were everywhere: A false Baldwin IX, a false Alfonso I, a false Fredrick II, a false Henry V, a false Conradin, a false Edward II, a false Richard II, a false Valdemar II, a false Warwick, a false York, a false Joan of Arc, false Popes, and even a false female Pope Joan.
I may add that there may have been two imposters claiming to be King Olaf (1370-1387) II of Denmark and IV of Norway, one in 1402 and one in 1387 or 88.
The one in 1402 is quite well known:
The false Olaf from 1387 or 1388 is mentioned in The Middle Ages: Dictionary of World Biography, volume two, 1998, page 627:
“In Norway, a disaffected faction reported that Olaf was not dead. The Impostor claimed the crown and gained followers by revealing information that only Olaf or Margaret could know. Margaret hurried to Norway and proved that the impostor was the son of Olaf’s nurse by showing that he did not have large wart on his back Olaf’s birthmark. The false Olaf was tortured and burned at the stake.”