I have noticed a strange distortion in the part of my game that is displayed using a viewport.
Here are two sprites with a shader that draws a pixel-perfect grid. One of the sprites is a direct child on the tree, the other is displayed through a viewport. There is also a pixel thin line drawn with each one.
When the game started at the default resolution, both are displayed accurately.

However after I resize the window in any way, the sprite and the line displayed through a viewport become distorted:


It looks as though viewport resolution no longer matches the resolution of the area it covers.

I was expecting the ViewportContainer to automatically adjust the size and the resolution for the viewport it controls. I do set up my vports to resize after all, why would I want them to render at their initial resolution? Certainly not by default.
I also feel like, after two days of digging through documentation an discussions, I no longer understand what any of them mean by the viewports "size". Its internal resolution? Its logical dimensions in the UI space? What does it mean for the ViewportContainers "stretch" property to scale the viewport? What is size or size_override properties? I am confused and in need of help.

Indeed it looks like ViewportContainer assigns Viewport size (that is, resolution) from its own logical dimensions. It is fine so long as logical and pixel sizes of the game match, but once any scaling is used the sub-viewport contents specifically become over or undersized.
It makes no logical sense for the resoution to be set from the logical dimensions, and it looks bad on the screen, which makes me think this is a bug.

An existing bug report https://github.com/godotengine/godot/issues/61301
The workaround is to resize vports by hand the way it is done in the proposed fix.