I am only a casual Sketch user, so maybe my mental model is off here. When I sketch a UI and add a layer on top that represents a modal overlay, I would like to have this as my “background” to work on. I usually lock this layer to keep it in place and start adding layers (my UI elements) on top of it. When I want to select some of those top-level layers using marquee, the elements behind my locked layer are being selected, too, which is definitely not my intention. Is it possible to make a layer a “selection barrier” (if that makes sense)? For locked layers, this would make much sense in my opinion.
In version 97 we introduced an improvement to work with locked layers: you can select them through the layer list and make any edits you need!
So I think you just need to change which layers you lock: instead of locking the top layer that works as the overlay, lock the layers that are in the background, behind the overlay. You’ll still be able to select them through the Layer List to make edits and you can use the marquee tool to select the layers on top that belong to the overlay