I always have my tablet plugged in but I never use it for navigation.
Looks like windows enables by default a service called “Touch Keyboard and Handwriting Panel”.
I disabled it following these instructions.
Now the editor doesn’t freezes anymore even with my tablet plugged in.