I've had this problem in the desktop app and online versions. When I am using the brush and eraser I use 'B' and 'E' to toggle between them. I've noticed that sometimes it will immediately switch back after I tell it to change. Sometimes it doesn't respond to the shortcuts at all.