If a servant acted contrary to what Allah knew, that would imply divine knowledge becoming false, which is impossible.
It still does not follow that the servant acts without choice. The infallibility of Allah's knowledge and the servant's own chosen action are both affirmed.