How do you check the version, from the code or from the file properties?
I tried the scenario you described on a Blazor application, and after building the project in the properties of the .dll file I can see all versions I set in the .csproj
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyVersion>2022.01.14.1</AssemblyVersion>
<FileVersion>2022.01.14.1</FileVersion>
<Version>3.3.3.3-xyz</Version>
And the result can be seen in the image below:

Is it possible that some other external process changes the version in the files after you build?