after talking with @rainersigwald, we realized that when msbuild invokes NuGet's GetReferenceNearestTargetFrameworkTask, it does not pass the tfm from a referenced project if it is a classic csproj.
code in question- https://github.com/Microsoft/msbuild/blob/51f53ebf530612beede45d13c535152785e23bdd/src/Tasks/Microsoft.Common.CurrentVersion.targets#L1700-L1713