Bug - using erase causes secondary color to be applied

I’ve assigned right-click to use eraser (default being fill). The bug happens when using shift-RMB to ‘erase a line’. Quite Strangely, every alternate click applies the secondary color (the one you swap to by hitting ‘x’). For example the first click erases as expected, the second click draws a line, the third click again erases etc.

Related:

Downloaded PNG in RGB mode fails to support transparency: erase uses secondary color and export PNG replaces transparent color with black · Issue #4370 · aseprite/aseprite · GitHub (only on opaque PNG downloaded from the net)