SSJS in a CSJS is computed on the server when the page is being rendered and the SSJS replaced with the result. So you're CSJS is not running SSJS. A browser cannot, by it's very nature of being a client, run server-side code. So you can include the result of SSJS in a piece of CSJS, but it will not have values updated since the last time that SSJS was recalculated on the server and passed to the browser.
You cannot update a viewScope variable via CSJS(Client Side JS), because the viewScope variable is only held on the server. It's a server-side Map, not a client-side browser cookie. So it can only be updated by server-side code or a post to run server-side code.
If you're wanting to update a viewScope variable with content from CSJS, you'll need to update a hidden input with the value, bind that hidden input to the viewScope variable and run a partial refresh to post the content of the hidden input to the server. If it's elsewhere on the page, just use SSJS to access the component / datasource and avoid the CSJS, but it's unclear what your use case is.