The early Medieval philosopher Boethius addresses this dilemma in part V of his Consolations of Philosophy. His solution is to distinguish between 'necessity with reference to a knower' and 'necessity in the thing itself'. The latter is 'simple like the necessity of all men being mortal', and the other 'condition'. An example of the former is the necessity of a man walking if some observer truly knows him to be walking. An example of the latter is the necessity of a sunset.
No necessity compels the steps of the voluntary walker, but when he walks he has to take steps. So too if Providence sees something present, it is necessary that it e, even though it may not be of a necessary nature. But those future things which result fromf ree will God sees as present. With reference to the divine sight they become necessary on condition of divine knowledge, whereas considered in themselves they lose nothing of the absolute freedom of their nature.
However, this does not seem to address the question of the Problem, ie, whether or not we are free: if we believe Boethius' scheme, all it can show is that if we are free, then there is no contradiction with divine foreknowledge. Even worse, it does not address the ultimate concern of the Problem, a conflict between divine responsibility for creation and the existence of moral evil: on Boethius' account, God has chosen to create beings which He knows will commit evil acts, and hence is responsible for that evil. That those creatures have, in some formal sense, 'freely chosen' evil does not abdicate God's responsibility for knowingly creating evil beings.