Real estate profits aren’t automatic anymore. Higher rates and new costs are testing investors—here’s how the smart ones are still winning.