I've tried to upload it to itch.io and it doesn't scale with the screen size and it becomes fixed and in itch.io if I try automatically detect HTML size then it gives me an error and I am using Unity 2020 3.21
Are you using v2.2 of the WebGL template? There are major differences across Unity versions, so if you've copied the version you were using in 2019 (i.e. v1.1) it would not work as expected.