Many online guides suggest:
While these help with generic RDP issues, 0x904 specifically involves the licensing subsystem. Better fixes target the root cause: mismatched or corrupted RDP licensing configuration.
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation" -Name "AllowEncryptionOracle" -Value 2 -Type DWord
If the IP address works but the hostname consistently fails, you can manually map the name to the IP.