You have to change the structure of the market so they no longer see these investments as profitable.
One way local areas do this is by "homestead tax exemption" which reduces property taxes if you live in your own home, but this is binary and punishes small landlords equally as big ones.