Hi there,
There is only one out-of-the-box solution to scale-up and scale-down instances, but it's focused on numbers of instances, not sized of VMs
If you need to change a size of VM, it requires to stop the VM. As an example, you can check the community-based solution. You can build the same by using Azure Monitor\Action Groups\Automation Account\Logica Apps etc