In rare cases, an old or incorrect product ID might be cached in Active Directory, causing the new key to be rejected. This is an advanced and officially unsupported procedure. Use extreme caution and ensure you have a verified backup of your Active Directory.
If the EAC simply says "Invalid" but the key and edition match: exchange 2019 product key invalid