A corporation in this state leasing its road to a corporation of another state shall remain liable as if it operated the road itself, and a corporation of another state, being the lessee of a railroad in this state, shall likewise be held liable for the violation of any of the laws of this state and may sue or be sued in all cases, and for the same causes and in the same manner, as a corporation of this state might sue or be sued if operating its own road, but a satisfaction of any claim or judgment by either of the corporations shall discharge the other.