You don't, because Alt+F9 is a keypress that only makes sense on the actual Linux framebuffer console. It switches to virtual terminal 9 on the real console. While it's possible to view the virtual machine's console using Boot Diagnostics, Azure doesn't allow sending keystrokes to the console. Therefore it is not possible to perform that action.
If you want to change the root password, you need to either log in with your normal user and sudo
, or mount the virtual disk to another VM and edit its password (shadow) file from there.