Found this resource: javascript - Value binding in <script>-tag not working - Stack Overflow where it is suggested a client-side way of binding the view model properties to the JS code.
But if I go with this approach, I am facing my previous forum question, of course: Visual Studio 2022 suggestions for dotvvm front-end object and its members - #2 by MarianV