basically dotnet_root detection is returning /etc/alternatives as root, because this is the folder where /usr/bin/dotnet is linking to
but the actual dotnet_root folder is /usr/lib/dotnet/dotnet6-6.0.108
so I believe the detection function should be updated to account for this.
Note: Setting DOTNET_ROOT environment variable to /usr/lib/dotnet/dotnet6-6.0.108 is a valid workaround, so this is not an urgent issue.