Oh, thanks!
The width: 100% CSS directive is what caused the visible presentation size of the canvas to scale up to fit the browser window. The CSS directives don’t affect the WebGL render target sizes, so the engine can still continue to render to its existing sizes independent of what the visible presentation size is. It would be possible to register a resize handler in JavaScript land to resize the WebGL canvas when browser window is resized, if one wants to match the visible size to the WebGL render target size.
If you do want to customize the canvas size behavior in different ways, there are a number of strategies that can be employed, though UE4 doesn’t by default export any of these. See here for an example. The resizing behavior you are seeing in windowed mode is equal to the “Aspect+None” soft fullscreen behavior.