Well, it used to be a discrete menu item a long time ago, but that’s gone in V8, the command still exists though:
ToolbarLock
Also here:
Yep, I found this one too, by accidentally double right-clicking on the 4-dot thingy on a docked toolbar awhile back - I don’t know why it was programmed that way.