Actually there is no real philosophical contradiction between an omniscient god and free will. There is only an apparent moral one, primarily because of the omnibenevolence factor usually attributed to god as well and bent at will by atheists. In fact, Christians don’t really have a problem reconciling an omniscient god with human free will, it’s only Reformed theology (Calvinists) who deny it’s a possibility. But in general, the dilemma has more to do with the doctrine of predestination, providence and free will, hence the many different theories like compatibilism, thomism and molinism.
But in and of itself, an omniscient god could have created autonomous beings, morally responsible of their own decisions. Two points to this: A) knowing the outcome of circumstances not make you responsible of such future unless you cause it. B) Knowing something does not represent anything real in the known object (Hegel would differ though).
The contradiction arises because there is a misconception of god, it often sounds like this: “Why would an all-good God allow a person to hurt another person? He either decreed it to happen or he either just sat and watch”. Christians would immediately point out that an omniscient or an omnibenevolent god ≠ all-controlling god.
And sure, apparent contradictory things can happen in the natural realm without necessarily dismissing their existence, e.g. an ex nihilo universe whose origin violated its own laws. You do not always need to redefine the attributes of something, e.g: god is omniscient, the universe came from nothing… Sometimes you can go as far as to develop the concepts themselves (‘omnisciency,’ ‘nothing’, etc.) by adding exclusionary clauses if it’s a better way to reconcile these ideas, they are not set in stone.
For more information, William Lane Craig expands on the role of God’s foreknowledge and human freedom a little bit more: