This is where TPMs, measured boot, and remote attestation come in.
You can run whatever kernel you want, but if it is not an approved kernel, you wouldn’t be able to attest to running an approved kernel; allowing whatever DRM scheme the developer put in to active.
I believe this is how the higher levels of Android’s Play Integrity system work.
Amazing how Israel was able to figure out when the unprovoked Iranian attack was going to occur that they managed to get their preemptive strike done in the nick of time.
/s