Yes, I noticed that padding problem too. Seems that certain elements/widgets had their names changed, or have been replaced with new elements/widgets, which makes code that works in older Cinnamon GTK to stop working in 5.4+.
This is how it looks in Mint 21 despite old code working in Mint 19; note the missing top-right border image:
And that's only part of the problem because as mentioned earlier there are corner borders that need to be placed with fixed or semi-fixed size in order to achieve the full look - something I don't think CSS is capable of. Maybe I'm wrong...? Are there
elements defined that could be tweaked by using image files? Gradients are simply unacceptable for this particular purpose.
Further issue: there is a fine external 1px outline on all border sides, as well as an internal 1px border frame. Those 1px lines belong to the image files. While all border images are stretched in a way that the 1px line remains at that size, the titlebar image should now be able to allow various heights according to new titlebar/headerbar settings and contents. As such, stretching the titlebar image vertically will inevitably stretch the horizontal 1px lines height breaking the overall aspect. I do not see any kind of fix for this issue.