This is a puzzling critique because it seems very much in the wheelhouse of "abundance YIMBYism" to advocate for cheaper housing--an argued byproduct of which is that fewer people are displaced. It probably changes the problem statement of gentrification since, if housing is abundant and displacement is low, there's not much to distinguish "gentrification" from just "investing in the neighborhood".
>the critical need for direct public housing to serve low-income communities
This isn't a problem caused by YIMBYism, nor one whose solutions are obstructed by it. We could by that reason malign it for not solving heart palpitations or cancer too.
Might regulations be the result of these "rational markets"? After all, if I invest a lot of money to build apartments, I might want to protect that investment by lobbying for regulations to make it harder for competitors, increasing the value of my investment. Or if I buy an apartment, I might want to prevent others from ruining my view, prevent noise, etc. All completely rational.
If it's the case that market participants have an imperative to convince the government to screw everyone else over: a solution preventing the government from being convinced by small petty nonsense seems remarkably simple, relative to the other kinds of policy challenges that exist.