AES-CGM (and the underlying CTR) is designed so that an attacker cannot tell apart the encryption of a message chosen by the attacker from the encryption of a random message of the same length. For decryption, we need to send the nonce. So if $H(m)$ is in the clear, that property of GCM is trivially broken.
Other than the potential of a hash collision, $(_1)=(_2)..$
This makes the issue worse. If $m_1$ is the message chosen by the attacker and $m_2$ is a random message. Collision resistance allows the attacker to easily tell apart encryptions of $m_1$ and a random $m_2$ when the nonce is known.
The approach of generating the nonce from the message is not without merit, though; generating nonces from the message is used in constructions like AES-GCM-SIV and other schemes designed to provide nonce-misuse resistance. A single nonce reuse can be catastrophic for AES-GCM. The difference in the construction in the question is that the nonce is derived using a PRF (a keyed construction such as CMAC or PMAC).
The answer linked in the question highlights that one needs to be careful with tossing in a key for the hash construction. $H(m|k)$ is somewhat better than $H(k|m)$; however, the former can be attacked offline by finding internal collisions.