@Andrew Robie
I understand that your Java installation is disappearing overnight, sometimes after resizing or a restart. Let me know if I am missing something.
Based on the clues you provided I am guessing you might be installing this on the temporary disk. The temporary disk provides short-term storage for applications and processes, and is intended to only store data such as page or swap files. Data on the temporary disk may be lost during a maintenance event or when you redeploy a VM.
On Azure Linux VMs, the temporary disk is typically /dev/sdb and on Windows VMs the temporary disk is D: by default. The temporary disk is not encrypted by server side encryption unless you enable encryption at host.
Can you confirm if you are installing this on the main data disk or OS disk?
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.