A mortgage, deed of trust, security agreement, or other security instrument affecting real or personal property, or both, executed by a cooperative or foreign corporation doing business in the State under this subtitle is governed by the Real Property Article or by Title 9 of the Maryland Uniform Commercial Code, or both, as applicable.