I'd like a lock function, too.
Lacking that, the easiest way I've found to restore things is to simply go to Windows | Palette Layout | <your named layout>
This of course only works if you have defined, or redefined, your palette layout scheme in the Work Environment (Options menu).
Karl
AC 28 USA and earlier • macOS Sequoia 15.3, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
One of the forum moderators