There is a difference in your examples. Apple decided to mandate a dev. account for alternative app stores —something that Apple has to allow by law now. If Apple had not decided to take a rather absurd interpretation of the DMA, they would had no trouble removing dev. accounts. However, as you need one to publish an alternative store, then you are—by extension—disallowing alternative stores without providing sufficient justification to why (within the DMA's legal framework).
A supermarket chain can delist a confectionary manufacturer, no problem with that. However, if there is only one supermarket chain and that chain delists third-party products in favour of their own brands, then it becomes a case of them acting as a monopoly.