Pressing the DynTopo button with the pencil makes the viewport unresponsive

Hello,
When DynTopo button is pressed with pencil it opens up the dialog window even if it pressed briefly without holding it and makes the viewport unresponsive. The only way to fix it is to relaunch software.
Pressing it with finger though works as expected.

To reproduce the bug:

  1. Put DynTopo button into shortcut bar
  2. Press it with pencil

Was using ipad pro with m4 chip and ipad os 26 dev beta.