Reduced window resolution is preserved when switching to full-screen mode

Unity version: 2020.3.26f1 LTS
can be reproduced in other versions too

Reproduction:

Actual results:

  • When going back to fullscreen mode resolution is being keept 500x500 pixels.
  • Scene is rendered in 500x500 pixels (the text is blurry and the canvas is squared).
  • Both Screen.currentResolution & Screen.width/height have 500x500 values.

Expected results:

  • Fullscreen-mode should restore the game resolution back to 1920x1080 (as on the very 1st screenshot before going to windowed-mode).
  • Both Screen.currentResolution & Screen.width/height should have the values of 1920x1080.

The problem caused by this behaviour (or bug) is that the user cannot return to full-screen mode with full display resolution after switching to windowed mode and reducing the window size.

I haven’t found anything about this behavior in docs.

So, here we have at least 1 bug.

Screen.currentResolution docs says:
Returns the current screen resolution (read only). If the player is running in windowed mode, this returns the current resolution of the desktop.

As you can see on the last screenshot it doesn’t return the current desktop resolution.