A good analogy would be me making a new control panel for a mechanical machine, where the panel has metal arms and rods that connect to the machine's original mechanisms to bring about a certain result that the machine itself would be incapable of bringing on its own.
You wouldn't say I can't distribute that new panel I made because the original machine is patented, right?
However, it would be so contrary to the spirit, if not the letter, of the law that I expect any such attempts would quickly gain antitrust scrutiny and new legislation declaring that APIs and software included in a device may only be monetized at point-of-sale (with the exception of subscription plans marketed toward consumers). It is possible that a court would even see it as such a violation of the law's intended effect that they would step in.