Desktop is even better with original theme, but on mobile original theme loses because “Total blocking time” is better on modified because a lot of JS code is not run until user interaction. And this is also a reason for “Cumulative Layout Shift” as many elements are added by JS (like chat icon) and, importantly, the product image is not loaded because modification makes it “super-lazy”.
Yes, you can probably just remove this code and this line is placed above footer code:
Can’t be 100% there are no other mods, that’s why I suggested to re-publish the theme version you had before optimization.
The problem with this kind of optimisation is that they trick the PageSpeed site, but actual data used by Google for SERP comes from the end-users actual experiences submitted by millions of Chromes deployed around.
All CLS and TBT suppressed by this trick will re-surface as soon as these customers will start interacting with the site.