Divine foreknowledge encompasses events exactly as they occur. To infer from the infallibility of knowledge that a person has no intention or choice is a further claim requiring its own proof.
If someone chooses to lie, God knows that action eternally. Knowledge being infallible and the act being involuntary are not the same statement. Foreknowledge alone does not erase the person’s agency.
In discussions of obligation, this allows commands to believe or obey to remain meaningful even where particular noncompliance is foreknown.