Not always. A court decision recently invalidated the deed of a Methodist church that wanted to leave the denomination. The court declared that the departing people could take the facility and property with them.
If the decision sticks, the day might be coming when the membership in mainstream Protestant denominations declines even faster. Can't wait.
I don t know if that's true of other denominations; in ECUSA the Dennis canon was enacted after the departure of whole congregations, property and all, in the late 70s.
The Dennis canon (Title I, Canon 7.4): "All real and personal property held by or for the benefit of any Parish, Mission or Congregation is held in trust for this Church and the Diocese thereof in which such Parish, Mission or Congregation is located. The existence of this trust, however, shall in no way limit the power and authority of the Parish, Mission or Congregation otherwise existing over such property so long as the particular Parish, Mission or Congregation remains a part of, and subject to, this Church and its Constitution and Canons."
Interestingly, the Continuing churches (APCK and probably most others), prohibit the diocese and province from any ownership of a parish's property.