Until very recently that proved surprisingly difficult to achieve.
Here's the paper that changed that: https://thinkingmachines.ai/blog/defeating-nondeterminism-in...