Not necessarily.
Many masters programs will not require that you had majored in the subject - they might just have pre-requisite courses you must have taken.
Some of these entry requirements can then be fulfilled during a summer semester, or you could keep an eye on both masters and be conscious about taking upper-level courses in both subject areas, even if only one was your “initial” major.