Yes, that does some over the top sharpening which creates lots of artifacts, still I only see those lines in that small scene.
Also other scenes look ugly due to over-sharpening. The only vertical lines I see there are thanks to over-sharpening artifacts on marcoblock borders.
-> Assuming you want your source to not create those artifacts when applying that filter you would have to seriously destroy details in the source.
Cu Selur
Only way I see:
a. try to remove any existing compression artifacts of your source
b. use lossless compression to not introduce new compression artifacts
c. don't use such a simple sharpening filter (there are reasons for filters like SeeSaw, LimitedSharp, LimitedSharpFasten,...)
Your are using a crappy sharpening method which produces artifacts and you now want to destroy enough details/noise/artifacts in the source so that your filter won't create too many new annoying artifacts. (for example ringing artifacts:
https://en.wikipedia.org/wiki/Ringing_artifacts)
Another problem is that you also would need to compensate the artifacts your resizer creates.
=> in praxis: No, there is no nonsensical way (writing a script for each scene and/or frame seems total overkill) of fixing those artifacts in your source since anything you do with the source can't properly account for:
a. the resizer used (which will enhance existing artifacts when enlarging and also introduce new artifacts)
b. the sharpening which then enhances the existing and new artifacts of the processed source
Best way would be to not use that sharpening shader or use other shaders after it which try to remove the artifact introduced by it and the resizer.
Cu Selur