Answer
Yes — on older releases, Execute Online SQL statements were limited to 1000 characters, which was a confirmed bug rather than an intentional design limit; it was fixed from 22R1 SU4 and 22R2 onward. If you're on an older release and hitting an unexplained truncation or failure with a longer SQL statement in this kind of custom action, this length limit is a likely cause — beyond checking your release/SU level, note that Execute Online SQL itself is on a deprecation path, with BPA Workflows recommended for new work instead.