.NET optimizes out library references where they haven't been used. So if your "LibraryA" references a particular package but chooses not to use it, it may be optimized out of the DLL when compiled in release mode.
I think the correct approach is to have each project have references to the packages they need, and not depend on dependencies providing them for it. If your "LibraryA" includes a package but it is made redundant in the future, it may be removed from that library and inadvertently break your other projects.
If you want to apply NuGet package references across all projects within your solution you can actually add them to the
Directory.Build.props
file in the root of the solution directory. This file will apply common properties to all projects in the solution, so if you need logging in all of them then add the dependencies here.
Customize your build - MSBuild | Microsoft Docs[
^]