Since this is a For each loop, it sounds like some of the files you retrieve can be scanned or protected from extracting data, and thus PAD does not extract anything. It then fails on the Set variable action. But when you remove it, it continues even if it extracts nothing from a single file, but then it finds some text in the next file.
I suggest you add a If condition to check if %TextList% is empty and then add a Next loop action to inside the condition like this:

This will skip the files where nothing is extracted and then the flow won't fail.
You might also maybe want to add a Display message box action before doing Next loop to give yourself a pop-up message for each file where nothing is extracted, so that you can check the faulty files and figure out why they're like that.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.