An automation can’t do that anyway. I’m a little confused by you saying it’s a Citrix App but UI Explorer is able to identify individual elements - it shouldn’t be able to.
But when you do that, does the automation then function correctly? UI Explorer has nothing to do with what happens when the automation actually runs, it’s just a selector editor. The selector as it exists in the activity is what matters.
Once you get the element from ui explorer and use in automation is that selector working?
If yes then you need to go with that route…generally visual tree will have whole path that it can read but at times due to the application behaviour we might not directly indicate but can be used from visual tree still