It’s not breaking the law in this case as far as I know.
The law requires Apple to provide equal access to the iPhone hardware and software in marketplaces that it competes in.
That can be done in a manner that is either additive, by providing access to third parties (which is potentially a significant expense and liability) or subtractive, by choosing not to engage in the regulated activities at all, in that jurisdiction.
You're right that they're not breaking the law in this specific instance. I was referring to the many instances they've lost or are disputing in court, mainly around browser engines/JIT, their handling of default app screens, third party app distribution, extra fees, and mandatory app bundle signing.
In this case they're merely being obtuse by refusing to provide an API to other device manufacturers. Unless you genuinely believe that the cost/benefit analysis of adding a new feature to their OS dictates that they basically freeze development unless they're able to recoup costs by tying it to their accessories, then you must conclude that they made the live transcription API Apple-only, and therefore not DMA-compatible, only to make EU citizens feel like their laws were depriving them of new features.
An organization interested in good-faith compliance would expose their internal API surface with some vetting process for access by interested parties. Then as the API becomes stable they would open it up more broadly. If accused of being anti-competitive by restricting access they could easily and correctly argue that they were working with potential competitors on that stable and secure API, and that their actions balanced the interests of market competition and security.
Of course, Apple is not interested in good-faith compliance. It's my belief that they should be made an example of so that they and other companies running the math in the future decide that proactive and good-faith compliance with regulations is more cost-effective than attempting to fight them.