Then that would mean God is not perfect having manifest a flawed creation that would then result in the fall of humanity because God is omniscient. So Omniscient God manifesting an imperfect creation is not then a divine perfect creator.
And yet the Bible says God is sovereign and all things happen according to his will. All things. Even that which is evil. (Isaiah 45:7)
Chooses not to know. Because we are created as free moral agents, God choose not to know how we will use our free-will choices. Adam was not forced to eat/ disobey God.
Free will is not a flaw but a freedom to choose to keep God's law or not.
Breaking God's law resulted in Adam's death. Keeping the law would have resulted in Adam living forever on a beautiful paradisaic earth. Both Satan and Adam failed in love and respect for their Creator and Life Giver.
In Scripture 'evil' is Not always synonymous with wrong doing.
God used evil in the form of calamity against the wicked in Noah's day to protect the righteous. Jesus will use the words from his mouth as a calamity against the wicked before the start of his 1000-year reign on earth.- Isaiah 11 vs 3,4; Psalm 92 v 7