One solution would be that you create a Lua module and require it from your render script, store the results from render.get_window_width()/height() inside that module and then require it from other places and read back the values.
You could also set up a publish/subscribe system either using function callbacks or message passing between the render script and interested parties.