This is already done on some consoles. Unfortunately this is usually a nonstarter for other systems because it makes it impossible to debug code on them.
Well, I was thinking you'd do it for all the .apps and the kernel/kexts, which you can just forbid debugging. But I guess you can't do much about all the code in the dyld shared cache which has to be debuggable, and that's a lot of the OS right there.
That is the end game for Windows hence the compulsory use of XBox's Pluton on modern systems.
https://learn.microsoft.com/en-us/windows/security/hardware-...
Windows Server 2028 shows where the road goes.
https://techcommunity.microsoft.com/blog/windowsservernewsan...