I finally made it work.
I did everything that guide said, except for the project file which I changed to this:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<UserSecretsId>*****</UserSecretsId>
<UseBlazorWebAssembly>true</UseBlazorWebAssembly>
</PropertyGroup>
...
But I have no idea if it is correct when official upgrade guide says to use:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
instead of:
<Project Sdk="Microsoft.NET.Sdk.Web">