Deselect. You're still in mask mode, which is kind of weird but I guess OK?
Reselect the same layer. Now you're out of mask mode. Why?
I think if you change your layer selection in a way that is incompatible with mask mode, mask mode should be disabled and you should have to explicitly re-enable it.
I think if you change your layer selection in a way that is incompatible with mask mode, mask mode should be disabled and you should have to explicitly re-enable it.