Theres a lot going on here. First off, using this selector pattern is a bad idea. You dont want to traverse the dom at all if you dont have to. Your better option is to have a UI dev add a data-cy or data-testid attribute to the dom node you are trying to access so you can get to it directly.
I genuinely suggest you take some time to go over Cypress best practices for selecting dom nodes.
https://docs.cypress.io/guides/references/best-practices#Selecting-Elementshttps://www.capocaccia.dev/posts/testSelectors