[Bug] A blank white space appears when erasing the canvas
**Describe the bug**
A blank white space appears and covers the middle to the bottom section of the canvas when erasing the canvas.
Here is the video https://www.awesomescreenshot.com/video/13450607?key=caaf718794e5b4e01723f8472a025b6d

**To Reproduce**
Steps to reproduce the behavior https://www.awesomescreenshot.com/video/13449258?key=45a625eae8aa43585ed4d2f5a3f89d72:
1. Open this codesandbox https://codesandbox.io/s/forked-learn-react-sketch-canvas-r7xphg?file=/src/Demo.jsx
2. Create some scratches to the canvas (using the default/initial conditions).
3. Change the color of the scratch by clicking the "Select Color" button.
4. Create some scratches to the canvas again.
5. Change the stroke type/width from regular to bold by clicking the "Select Stroke" button.
6. Create some scratches to the canvas again.
7. Change the stroke type from bold to the eraser.
8. Create some scratches using the eraser on the canvas.
9. Sometimes the bug (blank white space) appears here. If not, please continue trying by repeating the steps above again.

**Expected behavior**
No blank white space appears.

**Screenshots**
(Attached above).

**Desktop:**
 - OS: tested on Windows 11 and macOS Monterey 12.4
 - Browser: both OS are tested on Chrome 108 also Edge on Windows

**Smartphone (please complete the following information):**
 - Device: not tested yet
 - OS: not tested yet
 - Browser not tested yet

**Additional context**
If we export the canvas to an image file (by clicking the "Save" button), the exported image has no blank white space inside it.
![image](https://user-images.githubusercontent.com/24468466/208869721-14439fdd-f56e-4132-844a-b44394e23da2.png)

In the codesandbox above, I have copied and pasted your code from the example folder to the App component but I didn't find any issue.
![image](https://user-images.githubusercontent.com/24468466/208871650-c9085a76-97b4-4b2e-9ac6-24dfa28beeae.png)
