When a declaration of claim to a homestead exemption has been filed in the office of the judge of probate, leaving the homestead temporarily or a leasing of the same shall not operate an abandonment thereof or render it subject to levy and sale, but the right thereto shall remain the same as if the actual occupancy thereof had continued.