Yes, and that is exactly the reason why the energy transition in the heating sector (insulation, conversion to heat pumps, etc.) is proceeding so slowly in Germany! - The incentives for landlords to invest in energy-saving measures are simply non-existent if increased heating costs (higher gas prices) can always be passed on to the tenants anyway...
Most cities, even more pronounced in Western Germany, have lackluster district heating networks — meaning green district heating concepts like in Denmark wouldn't work nearly as well.
There was a huge privatization wave in the 90s. Residential buildings in many cases now need to make a profit every year. High-capex measures that bring mediocre/hard-to-forecast opex improvements (entirely dependent on the price of fossil gas vs. electricity) like heat pumps are not going to win you fans among profit-driven investors.
That's just a wild guess. Switzerland is facing the same situation and yet, landlords are investing frenetically in the energy transition of their buildings to increase value. We're in a vicious circle of renovation and increasing rents where it has become an everyday struggle to afford rent. At least in thd cities.