The troops were still marching during maintenance, it doesnt matter if they were going out or returning, maintenance is cursed. Its just a bad idea to have troops moving at all during maintenance. I have lost 9 lvl 5 farming waves before cause i let em march through maintenance, its not worth the risk