Sorry about the inconvenience caused due to this error. We're currently investigating this error and would request you to please upvote this issue here (https://illustrator.uservoice.com/forums/601447-illustrator-bugs/suggestions/41396197-illustrator-24... ).
This is the best way of communicating with the Engineering and Product Management teams regarding issues and suggestions so they can be implemented in future releases. This way you'll keep getting all the updates related to this issue.
Few users have confirmed that if they close Layers panel, it works as expected. You may try this as a workaround.