What is essentially important is to state what the CCC said that the Tree of the Knowledge of Good and Evil really really symbolizes. Emphasis is mine
From CCC 396
The ātree of the knowledge of good and evilā
symbolically evokes the insurmountable limits that man, being a creature, must freely recognize and respect with trust. Man is dependent on his Creator, and subject to the laws of creation and to the moral norms that govern the use of freedom.
The tree is not about humanās knowing. It is about the difference between the Creator and the Creature.
And who knows everything which of course would have to include both good and evil? God or humans? Knows is way different from actions. One does not have to physically put a car together before one drives it. At least some women donāt.

God knows how to put the universe together so that humans can live there. Did Adam know the same thing? Could Adam want to know how to put the universe together so he would not have to obey the real God? Moral obedience to God can curb oneās actions.
Can we deny that God knows what happens when a creature wants to be god-like and know everything; for example, how to alter the universe so that it conforms to human desires. No rain on the weekends. We could say that Adam wanted Godās knowledge which would mean that Adam would be all powerful. Then Adam would not have to obey his Maker.
As the last sentence of CCC 396 says.
Man is dependent on his Creator, and subject to the laws of creation and to the moral norms that govern the use of freedom.