The 2nd prophesy of Jeremiah 46:13-26 did happen in 568BC.
Following the destruction of Jerusalem in 587BC , many Jews fled to Egypt and settled in various cities such as Migdol, Tahpanhes, Memphis and Upper Egypt. Jeremiah 44:1-2 read;
1 This word came to Jeremiah concerning all the Jews living in Lower Egypt—in Migdol, Tahpanhes and Memphis—and in Upper Egypt:
2 “This is what the Lord Almighty, the God of Israel, says: You saw the great disaster I brought on Jerusalem and on all the towns of Judah. Today they lie deserted and in ruins (NIV)
Later in Jeremiah 46:13-14, another prophesy was directed to these same exiles, foretelling the coming of Nebuchadnezzar.
13 This is the message the Lord spoke to Jeremiah the prophet about the coming of Nebuchadnezzar king of Babylon to attack Egypt:
14 “Announce this in Egypt, and proclaim it in Migdol;
proclaim it also in Memphis and Tahpanhes:
‘Take your positions and get ready,
for the sword devours those around you.’ (NIV)
Since the event described in Jeremiah 46:13-26 took place after 587BC, it was likely the same event described in Ezekiel 29:17-21.
A Babylonian fragment may prove the event existed. It was acquired by the British Museum in 1878, code BM33041, translated in 1882 by T G Pinches (reference https://www.jhalsey.com/jerusalem-book/standard/egypt/bm33041.html )
... [in] the 37th year, Nebuchadnezzar, king of Bab[ylon] mar[ched against] Egypt (Mi-ṣir) to deliver a battle. [Ama]sis (text: [...]-a(?)-su), of Egypt, [called up his a]rm[y] ... [...]ku from the town Puṭu-I̯aman ... distant regions which (are situated on islands) amidst the sea ... many ... which/who (are) in Egypt ... [car]rying weapons, horses and [chariot]s ... he called up to assist him and ... did [...] in front of him ... he put his trust ... (only the first signs at the beginning and the end of the following 7 or 8 lines are legible).
Key points of it according to D J Wiseman [4, p.94]
the text B.M. 33041 which refers to a Babylonian march in the thirty-seventh year of his reign to do battle against [Ama]sis, king of Egypt, who had raised his army.
Studying the Egypt 26th Dynasty, Pharaoh Apries (589-570BC) was overthrown and forced into exile by Amasis II (570-526BC). He returned to Egypt with the assist of a Babylonian army, but was defeated and likely killed (Apries was defeated but not Nebuchadnezzar).
Though the prophesy mentioned Memphis will be laid waste and lie in ruins without inhabitant (Jeremiah 46:19 NIV), but Jeremiah 46:26 also said;
26 I will give them into the hands of those who want to kill them—Nebuchadnezzar king of Babylon and his officers. Later, however, Egypt will be inhabited as in times past,” declares the Lord.
As a result, it appears that the period of desolation did not last for a long time. It is likely that Nebuchadnezzar briefly conquered the land and then returned to Babylon.