I can't reproduce this behavior. Here's an example text file; it looks like this:
this
is
a
test
Each line is 40 characters long (some text the beginning and then space-padded out to 40 characters). Here's a base64 version of the same file in case the above doesn't copy and paste correctly:
dGhpcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmlzICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIAphICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAKdGVzdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCg==
If I encrypt this file:
gpg --batch --encrypt --quiet --yes --always-trust -r testuser@example.com example.txt
And then decrypt the file:
gpg < example.txt.gpg > example.dec
I have the same file that I started with:
$ sha256sum example.txt example.dec
271db32972e3af0fa0c787b67f8f00fe7a97523f0669f5676e766eba281f0883 example.txt
271db32972e3af0fa0c787b67f8f00fe7a97523f0669f5676e766eba281f0883 example.dec
The whitespace has been preserved on all lines.