Change window size from script (SOLVED)

Not really. Your window/display size will always be the size of the screen itself.

But if you need “chunkier” pixels or a more zoomed in view you can ofc use a camera and apply or zoom (Camera component manual) or tell the render script to zoom (The render pipeline in Defold).

Note that window.get_size() will still report the size in pixels of the screen, even if you zoom with a camera or render script.