In MultiChain, as in bitcoin, the OP_RETURN data is definitely used to generate the hash of the transaction, otherwise we would have a serious security problem. However the output containing the OP_RETURN is pruned from the UTXO (unspent transaction output) set, in order to save space in the UTXO database.