If I understand things correctly, God acts like the author of a novel, in which each human life is a character. We must not assume that God and humans operate on the same causal plane. The author/character analogy says they do not. God’s causation is meta‑causal (author-level). Human causation is intra‑causal (character-level). Once we separate the planes, the contradiction disappears.
Jesus Christ in the Incarnation openly revealed the secret answer.
While on earth as a man… though he also was God.
Caused himself to stop operating in his powers of Deity.
In that state of being He can place himself into?
That is when the Father set the Son forth to create all men and angels.
Not knowing how they may choose, but only desiring that they would love
the Father with the same love He has for the Father.
Therefore, all men's souls, and angels, were created by the Son with the intent to have love with God.
The volition given us as required to be created in the image of God was not hardwired to love, or reject God.
And, without omniscience being operational when the Son created you?
He really could not know how you would choose.
We see this ability in Philippians 2:6-8!
Who, being in very nature God,
did not consider equality with God something to be used to his own advantage;
rather, he made himself nothing
by taking the very nature of a servant,
being made in human likeness.
And being found in appearance as a man,
he humbled himself
by becoming obedient to death—
Even death on a cross!
Jesus had to pray to the Father for all his needs.
He stopped being as God while making himself to be as a man!
And, while placing Himself into that status, He created how each
one of us should be with only love in his heart for each one created!