As you can see in the attached images, the same Adsense ad appears with a white background in dark mode while in system mode it appears with a transparent background, as it should be.
I don't know if it's a XenForo bug or it's really an Adsense bug, but I comment it anyway in case it can be fixed.