Adding set_size_override in addition to setting size gives me the same results as in version 3.3.4, oddly enough.
get_viewport().size = Vector2($width.value,$height.value)
get_viewport().set_size_override(true, Vector2($width.value,$height.value))
It's not what I think of as zoomed, but it matches your screenshots as well.