Hi @Aiden,
Thanks for contacting Microsoft Q&A platform.
I have found a similar question in the forum providing the link below. Please go through it and check if that solution helps you. If not kindly comment on this answer by tagging me. we can discuss on this further.https://learn.microsoft.com/en-us/answers/questions/1195850/disabling-sleep-mode-in-a-virtual-machine-in-azure
Hope this helps you.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.