"Cordova can have issues when restoring a local plugin from config.xml"
Just stumbled over these quite elaborate lengths Ionic Appflow goes in its documentation to work around a problem with Cordova CLI: https://ionic.zendesk.com/hc/en-us/articles/360009519314-Managing-local-cordova-plugins-using-a-npmrc-file
I couldn't quickly find an issue that properly reports these problems, especially with a reproduction, so this knowledge base article might be our best pointer to start an investigation.
To document: I could not reproduce the problem with both CLI 9 and CLI 8.1.1 with the steps I expected this to need (Create project, add platform, add custom local plugin, delete node_modules+platforms+plugin (to simulate transferring project), npm i, platform add again). Waiting for further information.