That arrangement would tend to preserve the magnetization.
It would be better if they touched. 5 cm seems like too much.
The preserving effect depends on d^2/A(area). If this is not<<1, the effect would tend to fall off as 1/d^2.
The time dependence depends on temperature and the particular characteristics of the magnetic material.