Hi Dan,
You pay Microsoft for the VM by the minute (rounded down) as long as it is running. So if your workflow is finished within 10 minutes and 30 seconds and you immediately shut down and deallocate the machine, you are billed for 10 minutes. Here is a comprehensive description of the Azure billing: https://adamtheautomator.com/a-guide-to-finally-understanding-azure-vm-pricing/. The most interesting section for you is probably āHow Azure VM Billing Worksā.
Kind regards,
Alexander