But they aren’t the part of the problem that is accountable for it. In a democracy you should expect that everybody will be appealing to the government to protect their own interests. The NIMBYs quite obviously do this. But it’s the local governments that implement the NIMBY-protecting policies. The local governments are the ones accountable to the people, not the NIMBYs. I imagine the delinquent politicians are quite happy when people point the finger at landlords instead of them.
It's certainly not the people moving in from outside the area who want to rent for affordable rates.
Landlords are part of the NIMBY problem, but not the only part.