If it works fine on other websites, the problem probably isn’t with your LESS/SCSS itself, but with how assets are handled on this specific site. Double-check if this website uses a different theme or has modules that override assets — sometimes the order of imports or a missing dependency causes the compiler to fail.
Clearing Odoo s cache and restarting with --dev=assets might help too, just to make sure it’s not using some old cached version.