To fix the issue you can do I think what you are trying to do, can not be done. SCSS is a CSS preprocessor which runs on the server-side. It would compile into CSS and then be rendered in the client-side (browser). And once it is compiled to CSS, all the SCSS variables are gone (Because the browser can only render CSS).
I wish did fix the issue. The best way would be to make the changes directly to the css file. For this you would need to parse the css content. Grab a specific selector content and change it's properties. An easy way is to output the custom properties in the page header (after the style.css in order to overwrite the default properties) or to put them in a separate css file.