Mechanical removal of moss with a rake or brush is dealing with the symptom, not the cause, so you clear it once and it all starts over again. The key is to change the conditions where moss grows in the first place: it thrives in acidic, compacted, and damp soil in shade.
Try liming your lawn - moss can't tolerate an alkaline environment, and this works even in shady spots. Improve drainage if you have water pooling, and ensure good soil aeration through regular aeration (you might need to do it several times a season, not just once). In deep shade under trees, it makes sense to rethink your plantings altogether - grass often doesn't grow well there anyway, so moss fills the void by default.