The Windows command shell randomly prints block characters at the end of the output line

At my command prompt in Windows 10 (new console), I often see random cursor characters represented at the end of some lines, depending on the load on other tasks. I think this is associated with the output lines that contain LF characters (instead of the usual Windows CRLF line endings). Has anyone else seen this? Is there any way to stop printing these random cursor characters?

Example of output