This bug is difficult to pinpoint. Sometimes it’ll idle for a long time and work flawlessly when it receives the focus again. Other times you work on something else for just a couple of minutes and it’ll freeze after receiving the focus again (I can’t tell whether it froze the exact moment it got the focus or before, though).
Also, sometimes instead of freezing the pen pressure stops working. (don’t know if it’s related)
I unplugged the Wacom for a couple of hours and it hasn’t frozen so far.
And not using a touchscreen monitor.
EDIT2: It seems that when this issue happens, the mouse gets totally blocked in the interface (you can move the cursor but cannot click on anything), but the stylus pen keeps working. The keyboard also works.