When the previous command does not have a NEWLINE in it's output, the prompt shows up next to it. We could just add a NEWLINE to the start of prompt, but that doesn't look very clean. A solution would be implemented a MITM technique on stdout and just append NEWLINE before prompt if it isn't already present. This may be overkill though, and other solutions should be explored before-hand.
Example:
dShell $ > less test.txt
Hello World!dShell $ >