Instead of using the child controls of Gallery, see if changing the Items property to below formula may be a better approach for you, then leaving the child controls untouched.
Try with a new Gallery and see if the below formula works for you:
You place the below formula in the Items property of the Gallery:
Filter(yourDataSource, StartsWith(Name, "6"))
Replace yourDataSource in the above with the actual name of your data source.
If approach above doesn't work for you, you can continue the approach you were doing.
However, above may be a better approach for you.
I intentionally do not use Left, Value, etc. in the above Filter as these are likely not delegable.
However its seems you simply want to check if the Name starts with a "6" so the above filter may work, as it's not important if the value type is a number or not, just seeing if the name starts with "6" in particular may suffice and may be fully delegable as well.
See if it helps @Fredemanze