Hi Mazurek, Jakub,
Thank you for reaching out to us on the Microsoft Q&A forum.
Create a customized image from the existing virtual machine where your application is running and use that image on all required virtual machines.
Please refer to this document for further guidance:
https://azure.microsoft.com/en-us/blog/build-distribute-and-deploy-application-updates-to-azure-virtual-machine-scale-sets/?msockid=37b94b791a946a6c28125fff1bb96ba7
If this information is helpful, we would appreciate it if you could click the Accept Answer & Upvote on this post.