I would just like to say thanks to pshoeg for pointing us to the answer to this riddle.
We tried every other cure we could find, but his suggestion of using the php file at https://wejn.org/stuff/wejnswpwhitespacefix.php.html worked for us.
All credit to the author of the code too for working out a solution.
I suspect his code will help many others with this same problem as it’s a generic solution that should cover white line faults in code from third party template vendors.
We used the .htaccess method from the page mentioned in case anyone is interested.