Impossible to solve I’m sure. Probably lower priority than stopping them from putting lead in bread and selling cocaine snake-oil elixirs, or forcing them to list basic nutritional information on food packaging. Alas, we lack the tools to make businesses do or not do things.
Grocery stores are a low margin business. If you make selling shelf space illegal, they lose that revenue and will have to raise food prices to stay in business. This isn’t a good outcome. I also question if the shelves would even changes much. They will probably prioritize their high margin products, which doesn’t sound any better.