Thank you for reaching out to the Microsoft Q&A platform. I am happy to answer your question.
You can change the IP address assignment from DHCP to static by following these steps:
Go to the Azure portal and select the virtual machine you want to change the IP address assignment for.
Under Networking tab, select the Network interface and IP configurations, and change the assignment type to Static IP address settings
Type the desired IP address, for example, 192.168.1.101, and select Save.
Select Yes to confirm the change.
Note: It's recommended that you do not statically assign the private IP assigned to the Azure virtual machine within the operating system of a VM, unless necessary.
If you do manually set the private IP address within the operating system, ensure that it is the same address as the private IP address assigned to the Azure VM, or you can lose connectivity to the virtual machine.
You can find more information on how to configure static IP on azure VM here https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/reset-network-interface#for-vms-deployed-in-resource-manager-model
Hope this helps!
Please accept as answer and upvote if the above information is helpful for the benefit of the community.