Looks like visual editor has to be used in ClassicPress/WordPress to insert code

If you don’t want the code to run that is. Switched it back to WordPress, same issue.

I installed a plugin. After inserting the code block, switch to text, so the code can be inserted between the tags. Didn’t try highlighting the code and then clicking the code block toolbar item. Might be able to manually type it though.

There’s another solution, use Hugo.