kernel_task using 100% is the system thermally throttling and the OS spamming NOPs to cool the CPU down
But when RAPL and similar tools to throttle CPU are used, the CPU time gets reported as kernel_task - on linux it would show similarly as one of the kernel threads.