Once the scanning is fixed, check whether you want @theme or @theme inline. If any of your token values reference another custom property, the non-inline form keeps the reference rather than the resolved value, and it then resolves in whatever context the utility is used in. That is what you want for theming and extremely not what you want if the referenced variable only exists in one place.
Symptom is a colour that works on one page and is transparent on another, which sounds close enough to your bug to be worth ruling out.