Although the maximum size of cleartext (or @cleartext as the case may be) is 8,000 bytes, the the true maximum size is slightly less. The true maximum size is lowered by the header information prepended to the encrypted to the encrypted ciphertext by SQL Server, as well as by the padding added by the encryption algorithm. The true maximum size of the cleartext is 7,975 bytes if no authenticator is used, or 7,955 bytes if an authenticator is used. If your cleartext exceeds this maximum size this function will return NULL.
The return value indicates a maximum return value size of 8,000 bytes, but it cannot exceed 7,996 bytes in practice.