Is it true that a child must be 21 years old before they can leave home in Switzerland?

No! With 18 you are allowed to do "everything" (Vote, drive, drink, Mary...) but you can leave home whenever you have the money.