There aren’t an infinite arrangements of keystrokes that are the length of Hamlet and aren’t Hamlet. Hamlet is 191,726 characters long, it’s like guessing a password.
44 keys on a typewriter, 191726 characters, makes 44^191726 or about 4.054 × 10^315094 combinations.
I think you’re the one who is moving the goalposts. There’s no requirement for the monkeys to submit their output, the test is whether the text of Hamlet is among their key presses. As long as there is a nonzero chance, then there is a 100% chance it would appear in an infinite system. Any non-zero probability times infinity has a 100% chance of occuring eventually.
The monkeys mostly produce gibberish, that’s the vast majority of the potential outputs, but among that massive number is also the full text of Hamlet.