Left is no shader, right is with shader.
In order to better demonstrate what's happening, I first rendered the tilemap to a subviewport with a scale of 2. This means that for every pixel of the tilemap, it's rendered to a 2x2 quad of pixels in the subviewport. I then scale that subviewport up and record it, which allows visualizing the artifacts that happen when rendering the tilemap much clearer.