@Paladin_HGWTI agree. 'However long' is too vague, and some things will repeat simply because of structure.
'Hello! How are you?' comes up 209 times on SoL. 'Hello! How are you today?' comes up 9 times. 'I walked across the room' pops up 124 times.
If it's a highly detailed, unusual phrase, then that's different.
Even then, I would argue you need to take it in context. Is the story similar? Suppose I wrote (because I did write!): 'You are beautiful, and sweet, and adorable, and cute, and smart, and funny, and β¦ everything nice and good'
If someone else happens to publish that exact phrase, so be it. It's not all that magical. Even if it's literally plagiarism, it's not doing me any harm, and I don't find it 'overly deceptive' in the area of fiction writing.
In a speech? An academic paper? Maybe. The more someone personalizes it, the worst it gets. If someone were to take that line of dialogue and say, "Now, when I wrote this, I was thinking ..." and, in fact, they only 'wrote' it by borrowing it from me, that's dishonest.
Just use it as some dialogue? I wrote it and 99 times out of 100 I would just read it and move right along without even thinking, 'Hey! I wrote that! Mine!'
In my opinion, at least, the important claims are around reusing major plot elements in a sequence without permission or acknowledgement.
Here's a philosophical digression. I am (in general) a supporter of noncommercial fanfiction legality, so that's not necessarily borrowing characters or settings. It's also 'with acknowledgement', so straight plagiarism claims don't apply.
Want to write a new Harry Potter adventure? Have at it! You might inadvertently reproduce some short sections of J. K. Rowling's writing, because there are only so many ways of saying (I have no idea if she wrote this): "Ron! Wake up! We're almost late for class! We need to hurry!" - especially if you don't want to search every word she wrote every time you write something.
And that's still true if your 'Ron' is 'Ron Henderson', who is a totally different character attending Ilvermorny School of Witchcraft and Wizardry in the United States.
The phrases don't matter. Lifting whole chunks of dialogue for a class or a dance is different, and maybe (or maybe not) bad. What's bad is writing a fanfiction version of, say, the first book, in which nothing changes except the author. Maybe every phrase is different - and maybe every name is different - but if you haven't done anything new, it's a rip-off.
On the other hand, retell the first book from Hermione's perspective? That's new, even though the plot isn't. And, if you do that, whole chunks of Harry's dialogue have to be preserved intact or it's a pointless deviation. Harry said what he said. Maybe occasionally Hermione misheard it, but mostly not, I'd guess. She's a pretty reliable narrator.
Back to the original point. I'm at ~2.5 million words published. I would find it pretty unlikely that I haven't written at least some 12+ word sequence someone else has used, inadvertently, not as part of intentionally copying something. It happens. It took me under five minutes to find an 8-word sequence that is common to my work and 26 stories on SoL. 9 words only cuts it to 20. 10 words cuts it to 3 - two of which are me! - but 11 words remains 3.
Mind you, this is a pretty stupid, generic sequence of words. It's not plagiarism, not me of myself, not the other author of me, or anything else. No one reading it would ever stop and consider whether it was plagiarized.
But that gets back to the starting point - 'however long'. 11 words is apparently too short, at least in some cases. And, if an AI spit out those 11 words, it wouldn't make them necessarily not the AI-user's words, depending on what the inputs and outputs were.