"Although string is for finding strings, you can combine it with arguments that find tags: Beautiful Soup will find all tags whose .string matches your value for string."
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#the-string-argument
So you're searching for a tag with a special .string. How does .string work?
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#string
"If a tag contains more than one thing, then it’s not clear what .string should refer to, so .string is defined to be None."
It should be noted that Soup Sieve offers: :-soup-contains() and :-soup-contains-own(). -soup was added to signify they are not CSS provided pseudo classes. The own variant ensures that the text is found in the target element, not in descendants.