EU DMA was supposed to do exactly that, which is why they're talking about Notarization, but Apple is maliciously half-complying. The good news is that the DMA also has specific legal penalties for this kind of half-compliance[0], the bad news is that the EU is a slow and bureaucratic organization so who knows when that will actually be enforced.
[0] oddly enough called "anti-circumvention provisions", which is fucking hilarious
[0] oddly enough called "anti-circumvention provisions", which is fucking hilarious