Based on what you are describing, it seems to be a CSS issue on your side.
If your CSS was properly defined, the canvas should keep the same size on window resize.
The canvas in my CSS is set with a fixed width and height, as shown in the picture.
However, whenever I resize the window, it forcefully resets the canvas width and height to match the entire browser window width and height, causing stretching.
Yea, this is a known behavior. VTK forces the window’s dimensions on the canvas. Unfortunately, there isn’t much you can do right now because this event handler is setup inside the interactor in C++ - vtkWebAssemblyRenderWindowInteractor.cxx#L43
VTK can provide 2 options:
resize the canvas to window dimensions upon browser resize (current behavior)
canvas ignores resize events from the browser window. (this is what you need)