On the contrary, if it washes off and mixes with the water, then this will prove as a sign that he did not write the kitaab with sincerity.
Hence, he placed the kitaab in water, and after removing it, found that the entire kitaab, with all its pages, was dry. From this, he understood and was pleased that the kitaab was written with ikhlaas.
Note: Allah Ta‘ala deals with certain servants in special ways, and this action of Imaam Maalik (rahimahullah) was on account of his special relationship with Allah Ta‘ala and thus cannot be used as a gauge for every person to determine whether he has ikhlaas in his actions or not.
(Sharh-uz-Zurqaani ‘alal-Muwatta pg. 3)