You can return the layer list instead of converting to a string and then adapt your syntax a little by using the array_contains
function on the output in the expression.
@qgsfunction(args='auto', group='Custom')
def my_filter(layer_group, feature, parent):
root = QgsProject.instance().layerTreeRoot()
my_group = root.findGroup(layer_group)
layer_list = [layer.name() for layer in my_group.children() if layer.isVisible()]
# return the list of layers
return layer_list
Expression
array_contains(my_filter('my group'), "FIELD_1")
I used Select by Expression to demonstrate the result, rather than rule-based symbology, but the principle remains the same.