.FindByLayer does not only accept strings but also layer-objects. See if the below example works for you.
It basically gets a list of all possible layer-objects and finds the layer-object with the name to retrieve the objects from.
import rhinoscriptsyntax as rs
#list of layer names
layer_names = rs.LayerNames()
# get a list of all layer objects in the document that are not deleted
layer_objects = list(layer for layer in scriptcontext.doc.Layers if not layer.IsDeleted)
for name in layer_names:
# find layer object with FullPath == name and break out to pass layer_obj in FindByLayer
layer_obj = None
for layer_obj in layer_objects:
if layer_obj.FullPath == name:
# FindByLayer accepts both names ad layer objects so pass the layer object
rhobjs = scriptcontext.doc.Objects.FindByLayer(layer_obj)
#catch possible error here