Scientific Error
The Quran contains scientific errors within it. It's well known that the earth orbits the sun, so the sun does not set in a physical location. However the Quran specifies that the a sun sets in a physical location, specifically in a muddy pool:
Quran 18:86
Until, when he reached the setting place of the sun, he found it setting in a spring of black muddy (or hot) water. And he found near it a people. We (Allâh) said (by inspiration): "O Dhul-Qarnain! Either you punish them, or treat them with kindness."
More modern scholars that came 700+ years later such as Ibn Kathir say that this is the just the location as far as you can go:
Ibn Kathir on Quran 18:86
(Until, when he reached the setting place of the sun,) means, he followed a route until he reached the furthest point that could be reached in the direction of the sun's setting, which is the west of the earth. As for the idea of his reaching the place in the sky where the sun sets, this is something impossible, and the tales told by storytellers that he traveled so far to the west that the sun set behind him are not true at all. Most of these stories come from the myths of the People of the Book and the fabrications and lies of their heretics.
However, going to Mohammads companions, we can see that Mohammad taught that exactly what he said in the Quran - that Dhul-Qarnain went to the location that the sun sets. In a muddy puddle.
Sunan Abi Dawud 4002
I was sitting behind the Messenger of Allah (ﷺ) who was riding a donkey while the sun was setting. He asked: Do you know where this sets ? I replied: Allah and his Apostle know best. He said: It sets in a spring of warm water (Hamiyah).