though kbin still doesn't render the code block correctly it seems
Yeah, I hope ernest (or someone else) fixes it soon. Mbin has fixed it, so it should be possible to check there how it was done.
I did make a frontend fix for it which is included in KES and available standalone on Greasyfork. But it would be much preferable if this was fixed in kbin itself.
I think the big problem is that the issue on codeberg is closed. Ernest never got involved, but other maintainers closed it as a "lemmy issue" which it isn't. Lemmy is federating completely legal HTML with escaping applied to spec and kbin should be able to understand it. Mbin can understand it.