A classical objection asks: if God eternally knows which act a person will perform, how could the event differ from that knowledge? If it cannot differ, what remains of choice?
The response distinguishes an event corresponding to true knowledge from an event being coerced by knowledge. Knowledge is a true relation to what occurs; its truth alone does not turn the person's intention into compulsion.
Prior accurate knowledge of an action performed voluntarily does not by itself remove its voluntary character. The key is to distinguish certainty of knowledge from necessity imposed upon the agent.