Layer visibility and object visibility in a layout detail is a sub set of your model. They will turn on and off with the layers in your model, unless you make them invisible in your layout detail. Make everything visible in your model. In your layout, make the layers invisible as required with
HideLayerinDetail (or in the detail layers inspector panel, rightmost icon) and use
HideinDetail to make single objects invisible. You will find it will stay this way, no need to lock the detail.
However, adding new layers in your model will have them pop up in all the layout details, you will have to go to each one and make the new layer invisible if you want that.
It should be obvious by now, but you cannot turn a layer on or show an object in your detail when the layer or the object is hidden in the model.