Thanks for posting your question in the Microsoft Q&A forum.
Unfortunately, Azure Virtual Machine Scale Sets do not currently provide a built-in way to allow for extended graceful shutdown periods during scale-in operations. The default behavior is indeed quite aggressive, with only a short window before forcibly terminating VMs.
- You can implement a custom scale-in policy that selects VMs for removal based on specific criteria. This allows you to potentially flag VMs that are ready for shutdown
- Configure a custom script extension on the VMs that runs before shutdown. This script could initiate your graceful shutdown process, though it would still be limited by the short termination window
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful