I believe the error you're describing relates to this documented limitation;
"Virtual machines created from Marketplace resources with plans attached can't be moved across subscriptions."
There is a documented workaround for the scenario here : https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-limitations/virtual-machines-move-limitations?tabs=azure-cli#virtual-machines-with-marketplace-plans
I hope this helps :)