Reproduced on OpenSSH 10.3p1 on macOS: ssh: Could not resolve hostname nosuchhost.invalid: nodename nor servname provided, or not known. On the Ubuntu 24.04 production host, OpenSSH 9.6p1 printed the same with Name or service not known; the text after the colon comes from the system's resolver, so it differs by operating system.
With a Host alias whose HostName was misspelled, the error named the misspelled HostName, not the alias, and ssh -G ALIAS printed the hostname line ssh would look up.
Temporary failure in name resolution, another resolver message, usually means DNS itself is unreachable (no network, or a broken resolver in a container), rather than an unknown name.