Being known to Allah before its creation is not the same as a creature already having an external existence.
Example: The emergence of a creature was known to Allah, while the creature actually came into existence at its appointed time.
Thus divine knowledge is eternal, but the creature’s existence is originated. Allah does not gain new knowledge when creatures appear.