Why is my pixel art not scaling properly?

My pixel art looks fine in the scene view. But in game view, the lines appear thick and thinner in the wrong places. The pixel edges are only 1 pixel wide. I put the mouse cursor on the line for scale.
Image 1 has the line appearing thinner. And image 2 has the line appearing thicker. How do I fix this?

I found the fix for me. I don’t quite understand how it works entirely, but this video helped me learn how to correct it. I’ll leave a link here in case anyone else has trouble with this issue as well.

Pixel Perfect Camera

Ok I fixed it entirely for me. It turns out, all I had to do was to download the Pixel Perfect Camera package. Then I simply added the Pixel Perfect Camera component onto the camera object and it works perfectly. Now the pixels are scaled properly.

I learned it from this video and he explains how it works.