I have actually been looking in to this because someone else was asking about this in another thread.
The reason why it works in this case doesn't have to be technical.
Apps and services are sandboxed. One app talks to the SIM card to get SIM information. Another service handles phone telephony. The cellular radio doesn't have direct access to the SIM card. The operating system acts as a bridge between the two devices. When airplane mode is turned on, the OS tells the telephony manager to "power off" the cellular radio. After that, the OS doesn't send any data through the cellular radio.
Also, from what I've read, the modem is a separate physical part from the SoC. Like in this Pixel 6 teardown: https://www.techinsights.com/blog/teardown/google-pixel-6-pro-teardown