This was back in about 2020, afterwards I switched to Mate. There was some broken graphics code in XFWM, it had already been there for at least a couple of years as the person who started it had left the project before finishing it. On some machines the window borders were black and the buttons not displaying properly. This script changes the images that make up the display elements to another file type which helped in my case, you need to run it after every xfwm4 update. Also it showed a couple of the files were corrupted, and they had rather disturbingly been like that for some years without getting fixed.
#!/bin/bash
for f in /usr/share/themes/{Daloa,Default,Default-hdpi,Default-xhdpi,Kokodi,Moheli}/xfwm4/*.png
do
if [[ -f $f ]]
then
rm ${f}
fi
done
for f in /usr/share/themes/{Daloa,Default,Default-hdpi,Default-xhdpi,Kokodi,Moheli}/xfwm4/*.xpm
do
if [[ -f $f ]]
then
convert ${f} ${f%%.xpm}.png
rm ${f}
fi
done
You also might need to install the relevant xpm to png conversion package, whatever that was ... Imagemagick, I think. Also convert needs to change to magick to avoid a deprecation warning.
Check it makes sense in the latest version before running it because things may have changed, reinstall xfwm4 to revert the changes if needed. This is totally untested in the latest versions of xfwm4 so is only suitable for expert use. This worked by bypassing some xpm handling functions in xfwm4 incidentally, and might not be relevant at all in this case, but it's something else to check.