As said in this Kate bug.
When a line has no spaces and exceeds the window width, an extra newline is created above it, which is wrong.
Kate developers informed me that this is a limitation of Qt itself.
Test with this example on Kate.