This was driving me nuts for two weeks until I found the source of this error.
I have a MSIX Package. I also have a modification package that contains a plugin, and that modification package AppXManifest lists dependency on that package (a plugin).
I manually install the package and the plugin package while logged in as a user.
From that user account I run the Get-AppXPackage command. The returned list contains a direct entry for the main package but not the modification package. I'm OK with that because the modification package IS listed under the "Dependencies" property array of the main package.
I have a background process running under the local system account. This process then impersonates the user and runs the same PowerShell query. The main package is listed, however the modification package is NOT listed under the "Dependencies" property array.
It appears that there is no way for this background process to know whether or not the modification package is deployed.
So how would, let's say Config Manager or Intune (or my code) know not to install the modification package every time evaluation is run? Smells like a bug to me.
Thank you for your feedback. Unfortunately this is something we are unlikely to service in in market OSes and hopefully the options, albeit "very stupid" will help enable the scenario you are looking to achieve.