@Zhanelya Subebayeva Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.
Based on the shared information, I understand that you are trying to change the app service plan of a particular app service using cmdlets.
Adding to lukemurraynz response. To achieve your requirement, alternatively you can use the below PowerShell cmdlets.
$currentappserviceplan=(Get-AzWebApp -ResourceGroupName <RGName> -Name <AppServiceName>).ServerFarmId.Split("/")[-1]
$newappserviceplan=<NewAppServiceplan>
Set-AzWebApp -ResourceGroupName <RGName> -Name <AppServiceName> -AppServicePlan $newappserviceplan
Note: You can move an app to another App Service plan, as long as the source plan and the target plan are in the same resource group, geographical region, and of the same OS type. Any change in type such as Windows to Linux or any type that is different from the originating type is not supported.
Here is the Sample output for your reference:

I have tested this in my environment it is working fine, and I would suggest you validate from your end as well.
Feel free to reach back to me if you have any further questions on this.