Dynamically change SubViewport resolution

Godot Version

4.4.1

Question

I have a SubViewport in a 2D interface which renders a 3D object and display/window/stretch/mode is set to canvas_item in the project settings.
If I now increase the window size, the SubViewport gets bigger, but the render resolution doesn’t change to match its new size.
Is there a way to make the resolution change automatically?

do you use a subviewport container?

Yes, I do. I also tries activatingstretch, but that didn’t help.