Meforshim exlain that G-d's yediya, knoweldge, per se does not influence free will (were an astrologer able to predict what I was going to eat for breakfast tomorrow, I would still sit down in the morning and have the same range of choices before me. Whether this proof of the Ra'avad convinces you or is the best approach is a discussion for another time...) but when G-d utters a statement, that becomes the reality and there is no way out. E.g., in Parshas VaYechi, the prophetic vision had to depart from Ya'akov before he could reveal anything about the days of Moshiach because otherwise that utterance in G-d's name would remove any sense of free will.
The Chasam Sofer in Parshas Shmos asks what he calls a "kushya atzuma" (a great question): Moshe tries to declince to serve as G-d's messenger and says he cannot speak properly; G-d replies that He knows Ahron, Moshe's brother, will serve as spokesperson for Moshe and is in fact on the way to greet him in the desert. Did Ahron have free choice to accept of reject acting as Moshe's spokesperson on this mission? Asks the Chasam Sofer, if G-d told Moshe that Ahron would serve in that task, would that not by definition not leave Ahron the choice of not accepting the appointment?
The Chasam Sofer has an approach, but I would rather leave this one to think over than write the answer right away.