Eraser is a little special, it erases the part drawn in the shape of the shape selected with the tool.
Simply put, if you select a star and use the eraser, it will be erased into a star shape.
If you want to use it as a simple eraser, please select a free curve.
The eraser applies not only the shape but also the line thickness and dashed line type, but is not affected by filters.
If you want to hollow out the inside of the eraser, make the fill color transparent.