Thank you for reaching us!
may I know have you followed the prerequisites mentioned in the documentation. You need to ensure that the VM has the "AADLoginForWindows" extension installed. for more readings Sign in to a Windows virtual machine in Azure by using Microsoft Entra ID including passwordless.
Have you Select Use a web account to sign in to the remote computer option in the Advanced tab.
for more reading https://learn.microsoft.com/en-us/windows/client-management/client-tools/connect-to-remote-aadj-pc#connect-with-microsoft-entra-authentication
If the above information is not fixed the issue, please refer the below thread post which is similar to your issue https://stackoverflow.com/questions/76286748/azure-vm-rdp-the-login-attempt-failed
Let me know if you have any further questions.