Hello,
You need to upload your scripts inside a storage account or Github, then get the URL. Modify the procedure so that it access the location and get the script when the VM reboots
Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion
Regards,
Manu