How to prevent dock auto-hiding setting from changing?
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.