It is not too surprising that many HTML or JS based watermarking schemes are very easy to remove, some even via a script. For watermarking schemes to be effective, the watermark payload needs to be embedded in the content. Here's one approach that works for images:
https://github.com/tim-janik/imagewmark/
Another that works for audio content is: https://github.com/swesterfeld/audiowmark
Incidentally, the latter also supports applying the watermark payload to HLS segments.