The identify result with LayerOption.all is depending on LayersIds.
If you don't set LayersIds, :the identify task works on all layers whatever their default visibility, whatever the scale and whatever the group layer deep.
If you set LayersIds, the identify task works on all the layers of the list whatever the scale knowing that if a group layer is in the list, all its sublayers (and sublayers of sublayers, ...) will be identified as well.