Software signs the contents of the license file and also includes it within the file. Modifying even a single character invalidates the signature.
When you put a space or newline at the end, it most likely trims the file, ignoring those characters. If you place a letter or digit at the end, it will again be invalid.