After undo the tool skips to magnify glass

Hi I have a problem when I press ctrl+z (undo) the tool turns to magnify glass, and I cant use any other tool and have to close and reopen the software, why is it happening and what should I do?

Does this occur with one tool or all of them?

Does everything meet the software minimum requirements?

It happens after using the pencil tool