It is hard to tell what or why you'd be working around anything without an explanation of your expectations and a full code listing.
However, it is important that you understand character encoding when reading and writing to a file.
The newline character takes up a byte. It's value is 0x0A if we are using the ASCII character set. There are other character encodings aside from ASCII. There is also UTF-8 or UTF-16 encodings, for example. Every character encoding might have a different byte, or multibyte, representation for a readable text character, as well as the unreadable text characters, such as the newline.
On Windows, there is a convention to use carriage return followed by line feed, instead of just a line feed. Those two byes would look like 0x0D, 0x0A, in ASCII. On *nix systems there is no such convention.
Therefore, when you are counting bytes in your fstream, you will need to account for the newline character taking up a byte, or two bytes if you are expecting '\r\n', That is , if you are using ASCII encoding.
As far as I know, fstream assumes it's content is ASCII. This might have changed with C++17. I think there were plans to support various character encodings in streams. Those on the cutting edge might be able to comment.
Your operating system has a default character encoding set somewhere in its configuration. I know older Windows machines used Windows-1252. I am not sure what Windows 10 uses. I think most *nix systems use UTF-8. At any rate, you will want to consult your operating system's configuration.
C++ streams are going to want to transform from one to the other when you read and write to file. The transformation of text to it's byte representation are a big part of what streams are trying to do for you.
If you don't want the byte representation that the stream is going to provide, then you can feel free to write bytes yourself, however you wish, in binary mode. However, be mindful of how that effects other readers of the file and what encoding they are expecting.
So, keep in mind who created the file, what it looks like as text, what it's binary representation is, in file, and in memory, and code for it appropriately.
Lucky for us, some encodings also contain the entire ASCII character set, and simply expand on it. UTF-8 is one such encoding that does this.
You can refer to What's the difference between \n and \r\n? for a discussion on that topic.
You can also refer to Difference between files written in binary and text mode
"Standard C++ IOStreams and Locales: Advanced Programmer's Guide and Reference
Book by Angelika Langer and Klaus Kreft" is a good book if you want to really get to know your streams inside and out.