Double touches needed to make buttons respond after drawing on canvas
**Describe the bug**
After drawing a stroke on the canvas, there is a certain probability that the first click on the button on the page will require two touches to take effect.

See the video below for details. In the video, I loggged the click and touchstart events of the Reset button. Pay attention to whether the button responds after touching it, and the output log.

**To Reproduce**
See the video.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**

https://github.com/user-attachments/assets/1946d8b4-8764-4cc3-9dcd-dd5540f79891


**Desktop (please complete the following information):**

- OS: Windows 11
- Browser: Chrome (with device mode)
- Version: 131.0.6778.140
&nbsp;
- OS: Windows 11 (Tablet)
- Browser: Edge
- Version: 129.0.2792.89

**Smartphone (please complete the following information):**

- Device: Redmi Note 12 Turbo
- OS: HyperOS 1.0.9.0 (Android 14)
- Browser: Chrome
- Version: 131.0.6778.135

**Additional context**
Add any other context about the problem here.
