The word remembrance in Quran 18:83 indicates that the story has a psychological and spiritual significance rather than positivist one.
The story was intended by rabbis as an evidence of Prophetic authenticity rather than factual consistency. If the Prophet(s) had the same divine source as Abraham(p), he should be aware of Jewish stories which he did. Jewish stories are not considered to be accurate among orthodox scholars rather apocryphal.
The story of Gog and Magog is very significant for modern world. Narrations say they will throw their weapons in space and will claim defeat of inhabitants of heaven which is like western claim of science burying God. So, it predicts rise of a Godless modernity beyond Middle East.
Tafsir Al-Bahrani has a very useful lesson about the parallel roles of Prophetic guidance and scientific knowledge. When a heretic asks a Prophetic descendant about where the sun sets, he says: What some of the experts say is this:
قال (عليه السلام): " إن بعض العلماء قال
This shows Prophetic guidance never claims scientific omniscience.
A useful modern analogy would be criticizing a Nobel peace winner for not having a science degree.