How to prevent dock auto-hiding setting from changing?

I prefer to keep the dock "auto-hiding" setting on so that the dock is always hidden unless I mouse over it. I am aware of both the setting in "dock preferences" and the keyboard shortcut (⌥⌘D).

However, it seems that this setting will turn itself off, leaving the dock showing. It's usually when an application on another Space/Desktop steals the focus. It's easy enough to then use the keyboard shortcut to turn auto-hiding back on. But, it happens frequently enough that it's getting old.

It's not always the same app stealing the focus that causes this to happen. I'm not even sure if that's always what triggers it, but it usually seems to involve window focus and another Mission Control space.

I'm just wondering if anybody has encountered this and found a fix or the real root cause? Maybe some kind of defaults.write hack as a workaround?


interestingly, the answer at https://superuser.com/a/454391/196087 solves the problem:

in short, perform killall -KILL Dock and the dock will re-start, without the problem.