I’m going by memory as I switched to Android last year so I no longer use any keyboard shortcuts.
The default shortcut of E is not meant to be held down, You press E and release the key. Your current brush has now been switched to eraser mode and it stays in eraser mode until you press B to return to normal brush mode.
There is a plugin referenced above that provides a different way to engage eraser mode by holding E rather than pressing it (and no need to press B to return to regular brush mode ).