This seems to be a terminal emulator specific issue. GNOME Terminal doesn't seem to allow this, but Tilix has an option to enable and disable this. As a work around it will only strip newlines if they are leading or trailing characters, so if you copy the last letter of your command, a newline, and a subsequent letter it will execute. You may want a text editor handy to compose this sequence.