Yes, leave nicely realizing your paths may cross again. Above all, do not explain yourself. You may wish to gently side-step any conversations the school may wish to open about what they could do to encourage you to stay. Thanking them can be a great approach.

That said, also be aware that the school (or a particular teacher, or some parents) may feel spurned or scorned by your leaving and may set out to unilaterally "burn bridges", retaliate, undermine, ostracize, marginalize, or otherwise seek revenge, making your family's journey a bit more difficult than it may have otherwise been.