Unfortunately I don’t think this is an issue with Package Manager but rather an issue with the Script Compilation Pipeline. You might have better luck asking in Unity Engine - Unity Discussions
Or perhaps this thread might help? It seems related:
Let me ask a package manager specific question then: what is expected to happen when you have a native dll in a package and the package updates? As native plugins are never unloaded it would always cause an error correct?
It looks like the problem was caused by an error on my part, I renamed the native dlls to something else, and it was instead trying to load the managed dll into itself.
Now that is working correctly, I can’t update the package while unity is running - as I expected - as the native plugin is loaded from there.