When the "Hide Menu Icons" is turned on the autohide feature of the Mac OS Dock can get stuck. Although it's difficult to make this happen consistently, I have posted 3 screen captures in this Stack Exchange post.
If you view the above, you will see that the Dock gets stuck (1) when the Hide Menu Icons is turned on and (2) the Dock does not get stuck when the Hide Menu Icons is turned off and (3) the Dock gets stuck again when the Hide Menu Icons is turned back on.
I have also verified that the Dock does not get stuck after the computer is started in Safe Mode.
If you view the above, you will see that the Dock gets stuck (1) when the Hide Menu Icons is turned on and (2) the Dock does not get stuck when the Hide Menu Icons is turned off and (3) the Dock gets stuck again when the Hide Menu Icons is turned back on.
I have also verified that the Dock does not get stuck after the computer is started in Safe Mode.